As usual, this may well be common knowledge but I found this useful. In a stored procedure we were passing in a parameter (say @maxRows) which we wanted to use to dynamically limit the number of rows returned by the query. For ages we couldn't find a Read More...