HI!
Which of the next structures is most efficient?
1-
SELECT DISTINCT a.ID
FROM table a
inner join table b
on a.column1 = b.column1
and a.column2 = b.column2
and a.ID <> b.ID
or
2-
SELECT DISTINCT a.ID
FROM table a
inner join table b
on a.column1 = b.column1
and a.column2 = b.column2
where a.ID <> b.ID
1 or 2 ?
It's to remove the repeated data in my database
Thanks.