I have a list of names and phone numbers in a MySQL database. I need to know all the records that have a duplicate phone number.
I know I can do "select distinct phonenumber from table" and get a list of the non duplicate numbers. I figure I need to nest 2 queries together somthing like...
select * from table where phone not
in (select distinct phone from table);
But thats not working. I figure my syntax is messed up or something.
I know I can do "select distinct phonenumber from table" and get a list of the non duplicate numbers. I figure I need to nest 2 queries together somthing like...
select * from table where phone not
in (select distinct phone from table);
But thats not working. I figure my syntax is messed up or something.