Thursday 23 July 2015

T-SQL interview question rowcount

How to get the last record value in sql server without using MAX/TOP clause?
Solution :

Using the below query.
set rowcount 1

select * from employees order by id desc

No comments:

Post a Comment