Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

function similar to MySQL 'select ... limit'; found_rows()

User12317666-OracleFeb 1 2010 — edited Feb 1 2010
Dear experts,

I want to know if any similar function in Oracle to replace the MySQL function 'found_rows()' combined with 'limit' clause in previous 'select' statement to get the total satisfied record number without scanning the table again. Below is the sample in MySQL

mysql> select sql_calc_found_rows * from test limit 10;
mysql> select found_rows();

The first SQL count the total number of tabel 'test', but just show the 1st 10 records (maybe some page size limit); then the 2nd SQL returns the total table record number but db needn't scan the whole table again.

Any idea for similar SQL usage in Oracle because 10g seems not support found_rows() function ?
Thanks.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 1 2010
Added on Feb 1 2010
3 comments
2,081 views