Showing posts with label rowid. Show all posts
Showing posts with label rowid. Show all posts

Friday, February 24, 2012

How to achieve rowid of Oracle in SQL Server?

Any suggessions?You need to post more description about what you need to achieve|||

If you have a suitable single column primary key in a table then you can use it instead of rowid. Otherwise consider adding a column to the table with the IDENTITY property.

This is from Books Online

IDENTITY

Indicates that the new column is an identity column. When a new row is added to the table, the Database Engine provides a unique, incremental value for the column. Identity columns are typically used with PRIMARY KEY constraints to serve as the unique row identifier for the table. The IDENTITY property can be assigned to tinyint, smallint, int, bigint, decimal(p,0), or numeric(p,0) columns. Only one identity column can be created per table. Bound defaults and DEFAULT constraints cannot be used with an identity column. Both the seed and increment or neither must be specified. If neither is specified, the default is (1,1).

How to achieve rowid of Oracle in SQL Server

Hi:
How can I get the same function of rowid of Oracle in SQL Server.
thanks
Hi:
How can I get the same function of rowid of Oracle in SQL Server.

thanks
Link|||Just use MSSQL 2005. ROW_NUMBER() function (see ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/tsqlref9/html/82fa9016-77db-4b42-b4c8-df6095b81906.htm) is presented there.