First we do grouping of all the records in the table then display only those records whose count is greater than 1.
For more more details see the Emp table and Output result
Query: Select sal from emp group by sal having count(sal) > 1
Displays all the salaries which are duplicate in Emp table.
|
SQL | |
No comments:
Post a Comment