在SQL Server中沒有像Orcal中的rowid,但是可以運用一定的變通達到這個效果。
1、建立臨時表,其中包含rowid,2、重命名原表后刪除臨時表USE Tianzx
SELECT identity(int,1,1) as rowid,flow.* into temptable from flow--建立臨時表,其中包含rowid
DROP TABLE dbo.訂單信息對應關系--刪除原有表格
EXEC sp_rename 'tmp_ordermaininfo','訂單信息對應關系'--重命名臨時表