SQL Statements Flashcards

1
Q

What is does the UNION key word do?

A

UNION - combines the result of two or more select statements. Both select statements must have the same number of columns and they must be similar data types.

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

What does the IN keyword do?

A

IN - specify multiple values in a where clause. Checks if the value is in the list of values provided. Can also provide a list of values by passing a select column from another table.

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

What does the BETWEEN key word do?

A

BETWEEN - selects values within a given range, begin and end values included.

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

Name the wildcard character

A
% - zero or more characters
_ - single character
[] - any single character within the brackets
^ any character not in the brackets
- single character in a given range
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What would ‘WHERE Value LIKE ‘a%’’ return?

A

any values that start with a

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

What would ‘WHERE Value LIKE ‘%a’’

A

any values that end with a

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

What would “WHERE Value LIKE ‘_r%’” return?

A

any values that have r in second position

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