Oracle Migration

We are using Java EE application, and now we are using Informix DB. Our code falls into the database with queries such as "select the first 10 * from the test" Now, as far as I know, Oracle does not support the "first 10 *" types of operators. We have over 1000 queries like this.Should we manually change this or can it have some manual tuning?

+3
source share
4 answers

This is a good reason to use standard SQL as much as possible, and to isolate these dependencies in stored procedures (yes, I know that this will not help you in this particular case, I just thought I mentioned this for future reference).

I suspect that you will have to change each separately, although a simple search in your source code for "select" or "first" will be a good start.

You can then decide how you want to change them, since you may also want it to work on Informix.

What is it worth, I think you get the same effect from Oracle

select * from ( select * from mytable ) where rownum <= 10

( ) , , , . , DB2 (), .

, :

gimmeRowLimitedSqlQuery ("* from test",10);

:

select first 10 * from test
select * from test where rownum <= 10

, , , SQL , order by,

select first 10 * from test

, .

+2

JDBC " ", , , , .

+1

Oracle ROWNUM . .

0

TOP-n Pagination , ROWNUM. , , ROWNUM ORDER BY .

http://www.oracle.com/technology/oramag/oracle/07-jan/o17asktom.html Oracle.

0

Source: https://habr.com/ru/post/1736604/


All Articles