Podcast
Questions and Answers
Which clause is used in a SELECT statement to filter duplicate rows in the result set?
Which clause is used in a SELECT statement to filter duplicate rows in the result set?
- HAVING
- UNIQUE
- DISTINCT (correct)
- GROUP BY
What is the difference between DISTINCT and UNIQUE?
What is the difference between DISTINCT and UNIQUE?
- DISTINCT can only be used in the SELECT statement, while UNIQUE can be used in any SQL statement
- DISTINCT is not SQL standard, while UNIQUE is
- There is no difference, they are synonyms (correct)
- DISTINCT is used for filtering duplicate rows, while UNIQUE is used for defining unique constraints on columns
In which clause should you use if you want to apply the DISTINCT to some columns while skipping other columns?
In which clause should you use if you want to apply the DISTINCT to some columns while skipping other columns?
- ORDER BY
- HAVING
- GROUP BY (correct)
- WHERE
How does the DISTINCT clause treat NULL values?
How does the DISTINCT clause treat NULL values?
How do you retrieve unique data based on multiple columns using the SELECT DISTINCT statement?
How do you retrieve unique data based on multiple columns using the SELECT DISTINCT statement?
Flashcards are hidden until you start studying