Rushal Arora

Rushal Arora

  • NA
  • 112
  • 175.4k

@@Rowcount in SQL

Mar 11 2013 6:47 AM
Alternative of top class for delete and update query in sql 2000 is @@Rowcount & in Sql 2005 or 2008 we have

delete top(1) from emp where salary = 13000

update top(1) emp set salary = 1000 where salary = 13000

Above two queries can be executed only in Sql 2005 or 2008 but if we need to execute it in sql 2000 we do it with the help of @@rowcount .

Please tell me the above two query using @@rowcount.

Answers (8)