-4

i have table in sql and I want to remove duplicate records but remove all duplicate records

First name last name
a b
a b
a c

after run

First name last name
a c
  • Duplicate of https://stackoverflow.com/questions/6107167/mysql-delete-duplicate-records-but-keep-latest – codedge Jan 24 '21 at 14:57
  • 2
    Does this answer your question? [MySQL delete duplicate records but keep latest](https://stackoverflow.com/questions/6107167/mysql-delete-duplicate-records-but-keep-latest) – codedge Jan 24 '21 at 14:57

1 Answers1

0

You can use group by:

select first_name, last_name
from t
group by first_name, last_name
having count(*) = 1;
Gordon Linoff
  • 1,242,037
  • 58
  • 646
  • 786