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

Can we create clustered index on composite key?

517


Write a sql query to display the current date?

638


What are the new security features added in sql server 2012? : sql server security

535


Explain nested join?

566


What are the differences between user defined functions and stored procedures?

533






What do you understand by the denormalisation?

555


Explain forward - only cursors?

521


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

538


What is the difference between a function and a trigger?

575


Write an sql query for deleting duplicate rows?

552


what is denormalization? : Sql server database administration

479


What is a partition key?

523


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.

2472


What is the name of reporting services config file and what’s it’s used for?

107


Why do you want to join software field as you have done your BE in Electronics?

1706