select * duplicates, then select * non-duplicates - mysql
Posted: Sat Oct 27, 2012 10:24 am
The question is for the example table structure:
mytable
I want to select from mytable with a query:
basically select * from table where fielda is duplicated.
then with a different query select from mytable
val1 on fielda was encountered as a duplicate therefore it wasn't selected and the rest were.
mytable
Code: Select all
fielda, fieldb
val1 valx
val2 valy
val3 valz
val1 valaI want to select from mytable with a query:
Code: Select all
fielda, fieldb
val1 valx
val1 valabasically select * from table where fielda is duplicated.
then with a different query select from mytable
Code: Select all
fielda, fieldb
val2 valy
val3 valzval1 on fielda was encountered as a duplicate therefore it wasn't selected and the rest were.