760176104 发表于 2015-7-4 11:24:55

SQL Server 中的ROWID

  在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','订单信息对应关系'--重命名临时表
页: [1]
查看完整版本: SQL Server 中的ROWID