SQL SELECT DISTINCT Statement

The SQL SELECT DISTINCT Statement

The SELECT DISTINCT statement is used to return only distinct (different) values.

Example

Select all the different countries from the “Customers” table :

SELECT DISTINCT Country FROM Customers;

Inside a table, a column often contains many duplicate values; and sometimes you only want to list the different (distinct) values.


Continue reading SQL SELECT DISTINCT Statement