SELECT DISTINCT

SQL SELECT DISTINCT Keyword

The SELECT DISTINCT command is used to return only unique (different) values from a column or combination of columns in the result set.

Tutorials dojo strip

SQL SELECT DISTINCT Syntax

SQL

SQL SELECT DISTINCT Single Column Example

This query selects unique gender values from the Patients table.

SQL

SQL SELECT DISTINCT Multiple Columns Example

This query selects unique combinations of doctor_id and specialty from the Doctors table.

SQL

SQL SELECT DISTINCT Labs

Tutorials dojo strip