Distinct Clause

 
Tips>>SQL

MAKE FULL WEB APPLICATION WITH JUST SQL KNOWLEDGE? CLICK HERE

 

The DISTINCT clause allows you to remove duplicates from the result set. The DISTINCT clause can only be used with select statements.The SQL DISTINCT clause is used together with the SQL SELECT keyword, to return a dataset with unique entries for certain database table column.


The Syntax of DISTINCT clause is:-

SELECT DISTINCT column_ name(s) FROM table _name

Example I :-


"CITY " table :-

CITY PINCODE
Mumbai 400 092
Banglore 400 060
Goa 400 042
Mumbai 400 092

The SQL Table :-

SELECT DISTINCT CITY FROM TABLE

RESULT:-

CITY PIN CODE
Mumbai 400 092
Banglore 400 060
Goa 400 042


If you don't find what you are looking for. Please click here to submit your query, our experts will reply soon.

 

 
E-mail : sales@virtualsplat.com
Phone : +91-9892413501

+91-9967648641

+91-9967648641