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 syntax for dropping triggers?

750


To which devices can a backup be created and where should these devices be located? : sql server management studio

802


What is sql collation?

883


What is the difference between ROW_NUMBER and Ranking function in SQL SERVER?

904


hi, the following are the outputs of sp_spaceused and sp_tempdbspace sp_spaceused ------------ database size unallocated size tempdb 77752.95 MB 28026.99 MB sp_tempdbspace ------------- database size spaceused tempdb 77752.945312 1.007812 the unused space in sp_spaceused is nearly 28 Gb and in sp_tempdbspace is nearly 76 Gb cany any one explain about this output and why its giving different results.

2727


What is the use of floor function in sql server?

797


Write down the syntax and an example for create, rename and delete index?

779


Can a stored procedure call itself or recursive stored procedure? How much level sp nesting is possible?

823


What are the differences between decimal and float in ms sql server?

829


Explain isolation levels that sql server supports?

820


explain what are the steps you will take, if you are tasked with securing an sql server? : Sql server database administration

881


What are page splits?

805


Explain trigger and its types?

882


What security features are available for stored procedure?

823


What is the difference between update lock and exclusive lock?

722