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 |
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 |
You can use group by
:
select first_name, last_name
from t
group by first_name, last_name
having count(*) = 1;