Skip to main content

SQL Unique

SQL Unique

Select Unique statement is used to retrieve only unique data. Select Distinct command is used with Select keyword.
Note: SQL Select Unique and SQL Select Distinct statements both are same.

Example

 
SELECT UNIQUE column_name,column_name
FROM table_name;

Employee table

emp_idnamesalary
101Amit24000
102Rahul34000
103Hitesh24000
104Gaurav26000
105Hitesh35000

Example

SELECT UNIQUE name
FROM Employee;
Result after Execute above query.
name
Amit
Rahul
Gaurav
Hitesh

Comments