Week 8 Flashcards

SQL SELECT Statement/Queries

1
Q

The most used operation performed in most Databases is what?

A

SELECT (running a query)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

If you want the SELECT statement to return all columns, what do you use?

A. All
B. Any
C. *
D. $

A

C. *

Select *

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Use the _____ statement to choose a table from the SELECT statement.

A

FROM

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

To choose a specific condition, what statement do you use?

A

WHERE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

what is the statement to use to rename a column in the query?

A. RENAME
B. AS
C. COLUMN-NAME
D. FIX

A

B. AS

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

T/F: When you use the AS statement, you MUST use double quotes (“ “).

A

False

Only if you want to add spaces or use lower case.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

In Oracle 12c, arithmetic operations work in what order, and what operations are performed first?

A

left to right
multiplication/division, then addition/subtraction
Parenthesis can change the order

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the statement used if you do not want your query to return duplicates?

A

DISTINCT

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Combining the contents of two or more columns is known as ______.

A

concatenation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

To concatenate what do you use?

A. “ “
B. | |
C. - -

A

B. | |

How well did you know this?
1
Not at all
2
3
4
5
Perfectly