Skip to content

DISTINCT

SELECT DISTINCT country
FROM customers;
+-----------+
| country |
+-----------+
| USA |
| Germany |
| France |
+-----------+

The DISTINCT keyword in SQL is used to return only distinct (unique) values. In the example above, SELECT DISTINCT country FROM customers returns only unique country names from the ‘customers’ table.