0

I'm getting command not properly ended for the following script, can anyone tell me what I'm missing? Thanks

SELECT E_name, E_DOB FROM Empl
ORDER BY E_DOB DESC
LIMIT 3;
A.Rae
  • 11
  • 1
  • 3
  • 2
    Are you using `MySQL` or `Oracle`? How do you run your script? – PM 77-1 Mar 07 '16 at 15:48
  • 2
    Oracle doesn't support `LIMIT` –  Mar 07 '16 at 15:50
  • 1
    `SELECT * FROM (SELECT E_name, E_DOB FROM Empl ORDER BY E_DOB DESC) where ROWNUM <= 3` – Mihai Mar 07 '16 at 15:50
  • 2
    Are you missing that Oracle doesn't have the `LIMIT` keyword, and doesn't support top-N queries natively until [12c's `FETCH` and `OFFSET` additions](https://oracle-base.com/articles/12c/row-limiting-clause-for-top-n-queries-12cr1)? – Alex Poole Mar 07 '16 at 15:52
  • I was unaware Oracle doesn't support LIMIT. The answer Mihai gave works perfectly thank you all! :) – A.Rae Mar 07 '16 at 15:57

0 Answers0