SQL DISTINCT Statement

SHOW Table:

select * from employeeinfo;

name age address salary
Komal 25 Mumbai 5000
Ramesh 35 Delhi 4500
Kaushik 31 Indore 10000
Hardik 22 Hyderabad 8500
Aishwarya 28 Bangalore 6500
Akshaya 29 Delhi 5000

DISTINCT Statement:

SELECT DISTINCT salary from employeeinfo;

salary
5000
4500
10000
8500
6500

Leave a Reply

Your email address will not be published. Required fields are marked *