Home > database >  Database (sqlserver2012) how to heavy query ID, is not the same as the other fields of data
Database (sqlserver2012) how to heavy query ID, is not the same as the other fields of data

Time:10-24

Pick up a stick above, similar to the following data, id for the few lines in addition to the field C, 3 other field values are the same, how to find out a data only, I tried some distinct useless, because the duplicate data content is not the same,
A B C
 Id 
Qing bamboo 0707 1
2 color scale 0410 2
3 Lin 0102 1
3 0102 Lin 2
3 Lin 0102 3

Not to repeat, only check id to search on the net A lot of similar select distinct id, A, B, Max (C) from A
Group by id, A, B such answer, but doesn't seem to apply this, and type C is varchar database field, also use the Max.. O bosses action
  • Related