DISTINCT removes duplicate values from query results.
It ensures only unique values are returned.
SELECT DISTINCT column_name
FROM table_name;SELECT DISTINCT department
FROM employees;SELECT DISTINCT department, role
FROM employees;SELECT department FROM employees;
SELECT DISTINCT department FROM employees;SELECT DISTINCT department
FROM employees
WHERE salary > 50000;SELECT DISTINCT department
FROM employees
ORDER BY department;SELECT DISTINCT department
FROM employees
WHERE salary > 40000
ORDER BY department;Get unique values from a column in a table.
SELECT DISTINCT column_name
FROM table_name;Ask the AI if you need help understanding or want to dive deeper in any topic