Home›Learn›SQL›DISTINCT
SQL Master CourseBeginner Friendly

DISTINCT

Learn how to remove duplicate values from query results.

📘 Chapter 10 / 51⏱️ 8–10 Min Read🎯 Beginner Friendly
Course Progress20%

Course Progress

20%

10 / 51 chapters

📖

Theory

Understand the concept step by step

The DISTINCT keyword removes duplicate rows from the result of a SELECT query. It is useful when you only want unique values from a column or combination of columns.
💻

Example

See how the concept works in SQL

SQL
SELECT DISTINCT department
FROM employees;
📤

Output

Understand what the query produces

The query returns each department only once.

📝

Practice

Test your understanding

Display all unique course names from a students table.

❓

MCQs

Check your SQL knowledge

What is the main concept covered in DISTINCT?

A.Removes duplicate results
B.Deletes duplicate database rows
C.Creates unique tables
D.Sorts duplicate values
💼

Interview Questions

Prepare for SQL interviews

1

Interview Question

What does DISTINCT do?

2

Interview Question

When should DISTINCT be used?

3

Interview Question

Can DISTINCT be used with multiple columns?