0
我有一個表查找重複,並將其插入到一個單獨的表
Id int
Post code int
Suburb varchar
State varchar
我需要能夠找到的組合(post code, suburb, state)
的副本,並將其插入到該記錄不正確的數據絕望表
Eg
Id int
Post code int
Suburb varchar
State varchar
我有一個表查找重複,並將其插入到一個單獨的表
Id int
Post code int
Suburb varchar
State varchar
我需要能夠找到的組合(post code, suburb, state)
的副本,並將其插入到該記錄不正確的數據絕望表
Eg
Id int
Post code int
Suburb varchar
State varchar
INSERT INTO IncorrectResults (PostCode, Suburb, State)
SELECT PostCode, Suburb, State
FROM MyTable
GROUP BY PostCode, Suburb, State
HAVING COUNT(*) > 1
你用什麼數據庫引擎? – MarcinJuraszek