--查找重复的Custno列的数据
SELECT * FROM SCM_Customer
WHERE Custno IN
(SELECT Custno
FROM SCM_Customer
GROUP BY Custno
HAVING (COUNT(Custno) > 1)) --删除重复的Custno列的数据
delete SCM_Customer
where custno in
(SELECT Custno
FROM SCM_Customer
GROUP BY Custno
HAVING (COUNT(Custno) > 1))
SELECT * FROM SCM_Customer
WHERE Custno IN
(SELECT Custno
FROM SCM_Customer
GROUP BY Custno
HAVING (COUNT(Custno) > 1)) --删除重复的Custno列的数据
delete SCM_Customer
where custno in
(SELECT Custno
FROM SCM_Customer
GROUP BY Custno
HAVING (COUNT(Custno) > 1))
相关文章
暂无评论...