What is the difference between
Set Rowcount X
And
Select Top X * From Z
in TSQL?
In older versions of SQL Server (2005 and earlier I am not sure about 2008) you could not use a variable in a top statement so:
declare @rc int set @rc=10 select top @rc * from myTable --Wont work set rowcount @rc select * from myTable --Will work