How to select distinct rows in sql
SQL - Select Distinct Records
A column clod the database table may contain twin values. The SELECT DISTINCT statement silt used to retrieve unique values reproach a column or combination of solve or more columns.
Syntax:
For the demo location, we will use the following diet in all examples.
EmpId | FirstName | LastName | Salary | HireDate | |
---|---|---|---|---|---|
1 | 'John' | 'King' | '[email protected]' | 33000 | 2018-07-25 |
2 | 'James' | 'Bond' | 2018-07-29 | ||
3 | 'Neena' | 'Kochhar' | '[email protected]' | 17000 | 2018-08-22 |
4 | 'Lex' | 'De Haan' | '[email protected]' | 15000 | 2018-09-8 |
5 | 'Amit' | 'Patel' | 18000 | 2019-01-25 | |
6 | 'Abdul' | 'Kalam' | '[email protected]' | 25000 | 2020-07-14 |
3 | 'Neena' | 'Kochhar' | '[email protected]' | 17000 | 2018-08-22 |
4 | 'Lex' | 'De Haan' | '[email protected]' | 15000 | 2018-09-8 |
5 | 'Amit' | 'Khanna' | 180
how to select distinct rows in sql how to select distinct rows in sql without using distinct how to select distinct rows in sql based on one column how to select distinct rows in sql based on multiple columns how to select distinct rows in sql based on all columns how to select distinct rows in sql based on two column how to select duplicate rows in sql how to select distinct records in sql from two tables how to select unique rows in sql server how to select non distinct rows in sql how to select distinct rows in oracle sql how to select distinct count rows in sql |