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 the various types of concurrency problem?

923


What are the different subsets of sql?

1181


List all types of constraints in sql server?

683


Tell me about joins in database system and explain each in detail.

802


Explain data warehousing in sql server?

774






Can the query output be sorted by multiple columns in ms sql server?

730


What is NOT NULL Constraint in sql server 2012?

751


How to test a dml trigger in ms sql server?

756


What is the difference between clustered and non-clustered indexes in ms sql server?

673


How can you manage sql azure security?

99


What are ddl triggers and types of ddl trigger?

792


What is system stored procedures?

760


What are drillthrough reports?

128


Explain what are the basic functions for master, msdb, model, tempdb databases?

705


What is user defined datatypes and when you should go for them?

769