一条语句删除重复行
来源:未知 责任编辑:责任编辑 发表时间:2015-09-16 20:05 点击:次
一条语句删除重复行
--可以检测到null列重复
delete from [JCXS0201] where
USER_ID in(select User_ID u from [JCXS0201] group by User_ID having COUNT(id) >1 )
and
id not in (select MIN(id) from [JCXS0201] where USER_ID in( select User_ID from [JCXS0201] group by User_ID having COUNT(id) >1 ) )
www.2cto.com
--不可以检测到null列重复
delete from [JCXS0201] where
USER_ID in( select User_ID u from [JCXS0201] group by User_ID having COUNT(id) >1 )
and
id not in (select MIN(id) from [JCXS0201] group by User_ID having COUNT(id) >1 )
相关新闻>>
最新推荐更多>>>
- 发表评论
-
- 最新评论 更多>>