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

Answer Posted / vimal

SELECT ROW_NUMBER() OVER(ORDER BY eName ASC) AS Rno, *
FROM emp

asc or desc required

Is This Answer Correct ?    7 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to create a large table with random data for index testing in ms sql server?

545


what are triggers? : Sql server database administration

514


Please explain the characteristics of a transaction server for example atomicity, consistency, isolation, durability?

506


What is check constraint in sql server?

533


What do we have to check in database testing?

599






What is 2nf normalization form?

635


What is read committed?

619


‘Order by’ is not allowed in a view how can you sort information from a view?

591


You are designing a database for your human resources department in the employee table, there is a field for social security number, which cannot contain null values if no value is given, you want a value of unknown to be inserted in this field what is the best approach?

633


what are the new features in SSRS?

104


Why is normalisation important?

514


What does nvl stand for?

562


Name and describe few console utilities for ssrs?

249


How to connect to SQL Azure Database by using sqlcmd?

110


What is the default value of an integer data type in sql server 2005?

590