Retrieving Number of Row without using Count function in Sql Server Database.

vishalneeraj-24503
Posted by vishalneeraj-24503 under Sql Server category on | Points: 40 | Views : 351
SELECT MAX(A.ROW) AS 'ROW COUNT' FROM (SELECT ROW_NUMBER() OVER(ORDER BY ID DESC) Row FROM TEST1) A; 
SELECT MAX(ROW) AS 'ROW COUNT' FROM (SELECT ROW_NUMBER() OVER(ORDER BY ID DESC) Row FROM TEST1) A;

Comments or Responses

Login to post response