select * from mytable
where last in ( 
    select last from mytable group by last_name having count(*) > 1
)

Probably slow on a big table.

 -Clark


----- Original Message ----
From: flakpit <[EMAIL PROTECTED]>
To: sqlite-users@sqlite.org
Sent: Monday, April 28, 2008 8:33:36 AM
Subject: [sqlite]  Listing duplicate entries


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"

fred, johnson
roger, johnson


-- 
View this message in context: 
http://www.nabble.com/Listing-duplicate-entries-tp16941525p16941525.html
Sent from the SQLite mailing list archive at Nabble.com.

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to