I have a very fat common table expression which includes row numbers so that I can return a paged result set. I also want to return the total number of records that match th
You could append a field that has the total rows in it, of course it will be on every row
select recs.*,totalrows = (select count(0) from recs) from recs