SQL SELECT DISTINCT23-06-2019 0 Comment(s)
-- SQL Select Distinct on Single Column Example USE [SQLTEST] GO SELECT DISTINCT [Education] FROM [Employees]
SQL Select Distinct Multiple Columns
When we use the SQL Select Distinct multiple columns, the SELECT Statement returns the unique combination of multiple columns instead of unique individual records.
In this example, We are going to select the unique combination records present in the Education Column and Yearly Income Column.
Although we used the DISTINCT Keyword in the SELECT Statement, from the above screenshot you can observe that it is returning duplicates because
- Bachelors and 70000 is a Unique Combination
- Bachelors and 80000 is a Unique Combination
- and Bachelors and 90000 is a Unique Combination
No Comments to Show