我有个报表,数据库里面有许多重复的数据。我想在SQL里把SN字段的重复数据去重怎么写啊,麻烦请各位大神给我写一下,指点指点,谢谢了。我写的SQL如下 select * from dbo.checkinfo WHERE UpdateDateTime >='${qsrq}' AND UpdateDateTime <='${jzrq}' AND model LIKE '%${model}%' ${if(len(sn) == 0,"","and sn = '" + sn + "'")} ${if(len(Line) == 0,"","and Line = '" + Line + "'")} |
最佳回答 |
||||
0
|
|
|||
0
|
|
|||
0
|
|
|||
0
|
|
|||
0
|
|
|||
0
|
|
|||
0
|
|
|||
0
|
|
|||
0
|
|
|||
0
|
|