-1
SELECT *
FROM employee
GROUP BY first_name
HAVING count(first_name) >= 1;

How can i retrieve all rows and columns with single occurrence of duplicates? i want to retrieve all the table contents including repeated data that must occur only at once. In a table first_name,last_name are repeated twice but with different in other info. Please Help.

Radu Gheorghiu
  • 20,049
  • 16
  • 72
  • 107

1 Answers1

0

try this Sql Query

   SELECT * FROM EMPLOYEE WHERE FIRST_NAME NOT IN
   (   
       SELECT FIRST_NAME FROM 
       (
        SELECT ROW_NUMBER() OVER(PARTITION BY FIRST_NAME ORDER BY FIRST_NAME) RNK,FIRST_NAME FROM EMPLOYEE
       )A WHERE A.RNK=2   
   )
Sunil Naudiyal
  • 334
  • 1
  • 13