0

I'm using Oracle SQL developer to do some query. I met unknown syntax error while using limit clause

select * from rpo_restriction_criteria
limit 5;

Then it states "syntax error, partially recognized rules (railroad diagrams)." Does anyone know how to solve the syntax error for limit clause?

MT0
  • 143,790
  • 11
  • 59
  • 117
Henry Bai
  • 367
  • 1
  • 3
  • 17

1 Answers1

2

That's because there's no limit clause in Oracle.

Use e.g.

select * from rpo_restriction_criteria
fetch first 5 rows only;

or

select * from rpo_restriction_criteria
where rownum <= 5;
Littlefoot
  • 131,892
  • 15
  • 35
  • 57