how to get the rowid/rownumbes of a table in sqlserver

Answer Posted / raman

If you want row id as ROWID in Oracle, use %%physloc%% to
get unique id for each row in a table.
Ex. Query to get physical address/rowid of first row in
table.
SELECT TOP 1 %%physloc%% AS ROWID FROM <UrTable>

Is This Answer Correct ?    1 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain filtered indexes?

562


How many types of objects are there?

511


Explain transaction server implicit?

526


Are null values the same as that of zero or a blank space?

582


between cast and convert which function would you prefer and why?

547






What command is used to create a database in the sql server and how?

609


What is coalesce in sql server?

541


How many types of triggers in sql server?

525


Explain nested stored procedure. Syntax and an example for create nested stored procedure?

539


What is the difference between seek predicate and predicate?

594


What is the difference between sql server 2000 object owner and sql server 2005 schema? : sql server database administration

599


What is page-level compression?

559


Due to some maintenance being done, the sql server on a failover cluster needs to be brought down. How do you bring the sql server down?

876


When setting replication, is it possible to have a publisher as 64 bit sql server and distributor or subscribers as a 32 bit sql server?

507


What is report snapshot in ssrs?

166