DISTINCT

SQL DISTINCT Keyword

The SELECT DISTINCT command returns only distinct or different values in the result set. It is used to eliminate duplicate entries and show only one instance of each unique value.

Tutorials dojo strip

SQL DISTINCT Syntax

SQL

SQL DISTINCT Example

The following SQL statement selects only the distinct values from the gender column in the Patients table, This will return a list of all unique values found in the gender column such as F or M without repeating them:

SQL

SQL DISTINCT Labs

Tutorials dojo strip