删除 重复行数据

select * from (select *, ROW_NUMBER() OVER(partition by [FLID],[ZBM],[MC] Order by [FLID],[ZBM],[MC] ) AS RowNumber
from [MaterialClassFLMX])a where a.RowNumber>1

 

 

delete a from (select *, ROW_NUMBER() OVER(partition by [FLID],[ZBM],[MC] Order by [FLID],[ZBM],[MC] ) AS RowNumber
from [MaterialClassFLMX])a where a.RowNumber>1

posted @ 2017-06-26 19:42  三瑞  阅读(135)  评论(0编辑  收藏  举报