Yes, there is a way.  It's called joins.  :) I don't remember the exact syntax 
off the top of my head, but the approach is thus:

Do a self join on the table and select records that match in their first three 
columns, but do not have the same primary key (you *do* have primary keys on 
your table, don't you?).  If you don't add one for this excercise.

j----- k-----

On Tuesday 20 April 2004 11:22 pm, John Mistler said something like:
> Is there a way to use a SELECT statement (or any other, for that matter)
> that will look at every table in a database and return every row whose
> first 3 columns are duplicated in at least one other row in any of the
> tables? Essentially, a command to find duplicate entries in the database .

-- 
Joshua J. Kugler
Fairbanks, Alaska
Computer Consultant--Systems Designer
.--- --- ... .... ..- .-    -.- ..- --. .-.. . .-.
[EMAIL PROTECTED]
ICQ#:13706295
Every knee shall bow, and every tongue confess, in heaven, on earth, and under 
the earth, that Jesus Christ is LORD -- Count on it!

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to