Question : What is the difference between "SET ROWCOUNT" and "TOP" clause in SQL ?

Hi,

Can you please let me know:

What is the difference between "SET ROWCOUNT" and "TOP" clause in SQL ?

Thanks

Answer : What is the difference between "SET ROWCOUNT" and "TOP" clause in SQL ?

basically it's the same
there was a difference in sql 2000 that did not allow you to use top with a variable but you could use set rowcount with a variable
in sql 2005 this does not apply any more since you can use top with a variable
also set noroucnt holds until you reset rowcount to 0
top only applies to the current statement

those are the differences
both of them limit the number of rows processed by a statement
Random Solutions  
 
programming4us programming4us