Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> "limit 10" vs "rownum <=10"
So, we've got some inter-database portability issues we're trying
to address.
sqlite uses: select * from foo limit 1;
oracle uses: select * from foo where rownum <= 1;
What's the conventional wisdom on how to handle this? Is there something in oracle we can turn on to help?
Right now we're thinking of some logic like:
if oracle, string substitute "limit x" with "where rownum <= x" and try to handle the cases when there is already a where clause, etc.
Many TIA,
Mark
-- Mark Harrison Pixar Animation StudiosReceived on Tue Aug 01 2006 - 14:09:46 CDT
![]() |
![]() |