I have a request:
SELECT TOP 100 *
FROM TABLE1 T1
INNER JOIN TABLE2 T2 ON T1.ID = T2.ID
WHERE T1.........
How can I get the number of rows returned by the request, with the exception of the top 100. I want to return 100 records, as well as the total number of registered records. Is there an easier way to do this, and not just write the entire query without the top keyword and enable the account? eg:
SELECT COUNT(1) AS TableCount
FROM TABLE1 T1
INNER JOIN TABLE2 T2 ON T1.ID = T2.ID
WHERE T1.........
source
share