flakpit <[EMAIL PROTECTED]> wrote:
> Is there a way of querying the database to list all duplicate entries
> from a column in the same table?
>
> Something like "SELECT * FROM mytable WHERE last NOT UNIQUE"
select * from mytable t1 where exists (
select * from mytable t2 where t1.last=t2.last and t1.rowid !=
t2.rowid);
-- or
select * from mytable where rowid not in (
select rowid from mytable
group by last
having count(*) = 1
);
Igor Tandetnik
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users