I want to get the number of selected rows as well as the selected data. At the present I have to use two sql statements:
one is
select * from XXX w
try this way
select (select count() from XXX) as count, * from XXX;
select (select COUNT(0) from xxx t1 where t1.b <= t2.b ) as 'Row Number', b from xxx t2 ORDER BY b;
just try this.