I have a table like this:
id id2
1 435
2 345
3 345
4 567
5 456
6 987
7 987
Here in id2
345
and 987
are repeating twice, so I want to delete both the rows. My new table should look like this:
id id2
1 435
4 567
5 456
2
Answers
You can remove them from a
select
just by using aggregation:If you want to remove them from the table, use
join
andgroup by
:You can use
not exists
:Same you can remove the records :