Anonymous Anonymous - 2 years ago 97
SQL Question

FROM keyword not found

I am getting an error, even though I actually do have the keyword!

Here's my code:

SELECT TOP(10) * FROM TABLE_NAME


Here's the error:


[42000][923] ORA-00923: FROM keyword not found where expected


What am I doing wrong?

Answer Source

Here is the right way of accessing top # rows

SELECT * FROM TABLE_NAME
WHERE ROWNUM <= 10
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download