SQL -Structured Query Language - Sql Select - Select - Distinct Tutorial
To retrieve the distinct or unique or common value of the column from the existing created table. Then we can use a ' SELECT ' statement with DISTINCT.
Syntax-
The basic syntax of the SELECT statement with DISTINCT is given below –
SELECT DISTINCT column_name FROM table_name;
For example-
- Using numeric column name
SELECT DISTINCT(salary) FROM employees;
Here it will retrieve a unique or common salary in the record from the employees' table.