-- always returns a @@ROWCOUNT of 1, because of the SET statementdeclare @DoNothing intselect name from sys.databases SET @DoNothing = 1select @@ROWCOUNT as rowsReturnedgo-- saves the rowcount in @RC for later referencedeclare @rc intdeclare @DoNothing intselect name from sys.databasesSET @rc = @@ROWCOUNT -- save for later set @DoNothing = 1select @rc as rowsReturned