Equivalent of Oracle's RowID in SQL Server

前端 未结 13 1219
长发绾君心
长发绾君心 2020-11-27 04:22

What\'s the equivalent of Oracle\'s RowID in SQL Server?

13条回答
  •  情歌与酒
    2020-11-27 05:05

    I have to dedupe a very big table with many columns and speed is important. Thus I use this method which works for any table:

    delete T from 
    (select Row_Number() Over(Partition By BINARY_CHECKSUM(*) order by %%physloc%% ) As RowNumber, * From MyTable) T
    Where T.RowNumber > 1
    

提交回复
热议问题