DISTINCT
SELECT DISTINCT statement is used to retrieve distinct values from the table.
For example, in our students table, we have two persons having same name. If we just want to see what different first_names are in the table we use SELECT DISTINCT
SELECT DISTINCT column1, column2...
FROM table_name;
Table 1. STUDENTS table
SELECT first_name FROM students;
OUTPUT
SELECT DISTINCT first_nameĀ
FROM students;
OUTPUT