SQL stands for Structured Query Language. It is used to store, manipulate, and retrieve data present in a database server. We use the DISTINCT keyword in SQL with a SELECT statement to remove the duplicate records and return unique records. In this article, we will explore and understand the DISTINCT keyword. 


The DISTINCT keyword in SQL is used to fetch unique records and eliminates the duplicate records in the table. 


SELECT DISTINCT column1, column2,.....columnN 

FROM table_name

WHERE [condition]

Become The Highest-Paid Business Analysis Expert

With Business Analyst Master's ProgramExplore Now
Become The Highest-Paid Business Analysis Expert


Consider the table titled CUSTOMERS” with the records below;


The following SQL statement selects only the DISTINCT values from the ‘city’ column:


This will produce the following result:


Let’s look at one more example:


This will produce the count of different cities in the ‘customers’ table.


You can also select multiple columns to get unique results from them.



Gain expertise in the latest Business analytics tools and techniques with the Post Graduate Program in Business Analysis. Enroll now!

Next Steps

Now that you know about the SQL DISTINCT keyword, it’s time for you to take the next step. This is an essential step to moving forward in your journey to becoming an SQL expert. If you found this article beneficial and want to get certified, check out Simplilearn’s Business Analyst Master’s Program. This comprehensive program covers SQL in-depth. Upon completion you can earn your certification in this field can jumpstart your career. 

Do you have any questions for us? Feel free to place them in the comments section of this article. We’ll get our subject experts to answer them for you ASAP.

Our Software Development Courses Duration And Fees

Software Development Course typically range from a few weeks to several months, with fees varying based on program and institution.

Program NameDurationFees
Caltech Coding Bootcamp

Cohort Starts: 5 Aug, 2024

6 Months$ 8,000
Full Stack Java Developer

Cohort Starts: 30 Jul, 2024

6 Months$ 1,449
Full Stack Developer - MERN Stack

Cohort Starts: 30 Jul, 2024

6 Months$ 1,449
Automation Test Engineer

Cohort Starts: 7 Aug, 2024

11 Months$ 1,499