如何刪除SQLServer中重復的行?我怎么能刪除重復行哪里沒有unique row id存在嗎?我的桌子是col1 col2 col3 col4 col5 col6 col7john 1 1 1 1 1 1 john 1 1 1 1 1 1sally 2 2 2 2 2 2sally 2 2 2 2 2 2在重復刪除后,我想留下以下內容:john 1 1 1 1 1 1sally 2 2 2 2 2 2我嘗試過一些查詢,但我認為它們依賴于有一個行id,因為我沒有得到想要的結果。例如:DELETEFROM tableWHERE col1 IN ( SELECT id FROM table GROUP BY id HAVING (COUNT(col1) > 1))
如何刪除SQLServer中重復的行?
LEATH
2019-06-21 13:49:29