HOW TO SELECT DISTINCT VALUES IN SQL

SELECT DISTINCT IN SQL

SELECT DISTINCT

The SQL DISTINCT command is used with SELECT key word to retrieve only distinct or unique values.

Syntax-

SELECT DISTINCT column_name1, column_name2, …column_nameN

FROM <table_name>;

Description-

The distinct values from column_name1, column_name2, …column_nameN will be retrieved. It will avoid duplicate data.


Leave a Reply

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