The DISTINCT keyword can be used to return only distinct values.
DISTINCT Syntax
DISTINCT Syntax
SELECT DISTINCT column_name,column_name
FROM table_name;
Examples
select Code,Name from country
Result:
1 INDIA
2 INDIA
3 CHINA
4 LONDON
select distinct Code,Name from country
Distinct Result:
1 INDIA
3 CHINA
4 LONDON
0 Comments