2
我有一个日志表,里面有多行添加状态(“status = 0
”意思是“添加”)。如何从表中删除重复添加日志?
如何删除status = 0
但它必须是不重复的值。例如,每个交易ID(tid)必须只有一个值为status = 0
。
例如;
id tid tblname type status
1 101 x U 0
2 101 x U 0
3 102 x U 0
4 102 x U 0
5 102 x U 0
必须返回:
id tid tblname type status
1 101 x U 0
3 102 x U 0
我怎么能这样做?
的http://stackoverflow.com/questions/11130964/delete-duplicate-rows-in-sql-server-2010 – TechDo
可能重复的可能的复制[参数化一个SQL IN子句?](http://stackoverflow.com/questions/337704/parameterizing-an-sql-in-clause) – programmerist
对不起,我明白错误。抱歉。 – programmerist