CodesJava

Easy learning with example program codes

SQL DISTINCT keyword

The DISTINCT keyword is used to retrieve the unique records by eliminating the all duplicate records.

Syntax:

SELECT DISTINCT column1, column2,.....columnN FROM tableName WHERE [condition]

Example:

SELECT DISTINCT EMP_NAME FROM EMPLOYEE;

Output:

EMP_NAME
Nidhi
Parbhjot
Parmender

 
Next Topic: SQL SELECT TOP with example.
Previous Topic: SQL UNIQUE keyword with example.

 

Please follow and like us:
error
Posted in SQL   








Copyright © 2019 CodesJava DMCA.com Protection Status