Skip to content
Justice Tech School

DISTINCT

DISTINCT removes duplicate rows from the result.

Example
SELECT DISTINCT country FROM students ORDER BY country;

Result

country
Ghana
Kenya
Nigeria
South Africa

Exercise

Unique rows.

SELECT  country

Quiz Test

What does DISTINCT remove?

These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.