Is there a keyword or meta information in SQL Server that will tell you if the TOP effect has entered?
EX:
Select TOP 5 * From Stuff
RESULT: 5 rows
What is the best way to determine if there were 6 or more?
I could do:
SELECT TOP 6 count(*) FROM Stuff
But I am worried about a separate call to get an invoice, because the actual query is much more complicated than this one on a large table.
Thank!
source
share