Data Retrieval from a Single Table Flashcards
1
Q
What are the mandatory SQL clauses in a SELECT query?
A
SELECT, FROM
2
Q
What does the WHERE clause do?
A
Filters rows based on conditions.
3
Q
Which operator checks if a value is in a list?
A
IN
4
Q
What does % do in a LIKE pattern?
A
Matches any number of characters.
5
Q
How do you check for NULL values?
A
IS NULL or IS NOT NULL
6
Q
What does the BETWEEN operator do?
A
Checks if a value falls within a specified range.
7
Q
How do you rename a column in a SELECT output?
A
Using an alias (AS keyword, optional).
8
Q
What is the result of comparing anything with NULL using =?
A
Unknown (use IS NULL instead).
9
Q
What does DISTINCT do?
A
Eliminates duplicate rows from the result.