SELECT DISTINCT
Meaning in databases & SQL, with examples
In databases & SQL, SELECT DISTINCT means: A form of the SELECT statement that removes duplicate rows from the result, so each combination of returned values appears only once.
In Turkish: tekrarsız seçim, SELECT DISTINCT
How it is used
Handy for questions like 'which countries do our customers come from?'. Experienced developers are suspicious when DISTINCT is added to hide duplicates caused by a wrong join; the fix is usually the join, not DISTINCT. COUNT(DISTINCT column) counts unique values.
Example sentences
SELECT DISTINCT country FROM customers gives us the list of markets we sell in.
Don't fix the duplicates with SELECT DISTINCT; the join condition is wrong.
Common collocations
- SELECT DISTINCT
- COUNT(DISTINCT ...)
- remove duplicates
- distinct values
Related terms
This word in other fields
The same English word can have a different meaning in another field:
More terms: SQL Statements and Queries
Practise with graded reading
Reading at the right level is the fastest way to make new words stick. Pick free English books by level:
