SQL Flashcards

(26 cards)

1
Q

Indicates which columns to return

A

Select

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

Indicates which table to query

A

From

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

The rules that determine what is correctly structured in a computing language

A

Syntax

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

Select all

A
  • after Select command (SELECT *)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Semi;colon

A

When you end a query

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

Sequence the records returned by a query based on specified columns or column

A

ORDER BY

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

Order by descending order

A

ORDER BY xxx DESC

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

Ordering multiple columns

A

ORDER BY xxx, zzz;

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

The condition for the Filter

A

WHERE

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

Wildcard a special character that can be substituted with any other character

A

% substitutes for any number of other characters
or
_ substitutes for one character

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

Wildcard possible patterns

A

‘a%’ = apple, art, a
‘a_’ = as, an, a7
‘a__’ = ant, add, a1c
‘%a’ = pizza, Z6ra, a
‘_a’ = ma, 1a, Ha
‘%a%’ = Again, back, a
a’ = Car, ban, ea7

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

Apply wildcards to a filter

A

LIKE

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

An operator that filters for numbers or dates within range

A

BETWEEN

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

Comparison Operators

A

< less than
> greater than
= equal to
<= less than or equal to
>= greater than or equal to
<> not equal to

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

Specifies that both conditions must be met simultaneously

A

AND

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

Specifies that either condition can be met

17
Q

Negates a condition

18
Q

Joining tables

A

Employees.employees_id (example)

19
Q

Returns rows matching on a specified column that exists in more than one table

20
Q

3 types of outer joins

A

Left Join
Right Join
Full outer join

21
Q

Returns all of the records of the first table but only returns rows of the second table that match on a specified column

22
Q

Returns all of the records of the second table, but only returns rows from the first table that match on a specified column

23
Q

Returns all records from both tables

A

Full outer join

24
Q

Returns a single number that represents the number of rows returned from your query

25
Returns a single number that represents the average of the numerical data in a column
AVG
26
Returns a single number that represents the sum of the numerical data in a column
SUM