SELECT DISTINCT in SQL

HOW TO SELECT DISTINCT VALUES 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.


Posted

in

Tags:

Comments

Leave a Reply