Ho to Retrieving Table Row Count without using Count function?

 Posted by vishalneeraj-24503 on 12/2/2014 | Category: Sql Server Interview questions | Views: 1689 | Points: 40
Answer:

Write below query:-
SELECT MAX(ROW) AS 'ROW COUNT' FROM 

(SELECT ROW_NUMBER() OVER(ORDER BY ID DESC) Row FROM TEST1) A;


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response