【Vegas原创】查找删除重复键的数据
--查找重复的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))
喜欢请赞赏一下啦^_^