简体   繁体   中英

Offset Fetch error in oracle sql developer

I am trying to test a very simple query.

Select * 
from da.swati_testtable
Order by Salary
offset 1 row fetch next 3 row only

I tested the first part of the query uptil offset and it works fine. When i include the offset clause, it throws an error that

SQL command not properly ended and there is an error on the line with the offset code.

Regards Swati

You need semicolon at the end of your code and I believe it needs to be ROWS not row

Check here for details: https://docs.oracle.com/javadb/10.8.3.0/ref/rrefsqljoffsetfetch.html

Select * 
from da.swati_testtable
Order by Salary
OFFSET 1 ROWS FETCH NEXT 3 ROWS ONLY;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM