Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in SQL by (55.6k points)

Can anyone tell me how to use distinct in SQL?

1 Answer

0 votes
by (119k points)

Here is the syntax to use distinct in SQL:

SELECT DISTINCT column_list

FROM TableName;

Suppose you want to find the countries of customers from ‘Customers’ table:

SELECT DISTINCT Country

FROM Customers;

This is the basic example of using DISTINCT. For complex queries, you can check out this SQL tutorial by Intellipaat.

Related questions

0 votes
1 answer
0 votes
1 answer
asked May 3, 2020 in SQL by Sudhir_1997 (55.6k points)
0 votes
1 answer

Browse Categories

...