@@rowcount in SQL Server

Wednesday, 8 February 2012

@@rowcount in SQL Server

@@rowcount:

Returns the number of rows affected by the last statement.

Example:

print @@rowcount--It will return 0

select top 10 * from user--It will return 10 records of user table.

print @@rowcount--It will return 10

print @@rowcount--It will return 0

No comments:

Post a comment