I am getting this error using oracle sql developer for the query below and can't really figure out what is wrong with it. "SQL command not properly ended"
select * from Table1 FETCH FIRST ROW ONLY
What version of Oracle are you using? FETCH (...)
is only available in Oracle 12.
Please run this statement and see what it tells you:
SELECT * FROM v$version WHERE banner LIKE 'Oracle%';
After 5 years this question doesn't have a full answer except what is in the comments. Credit to @mathguy for the answer. You can do this
SELECT * from Table1 WHERE ROWNUM = 1
OR
SELECT * FROM Table1 WHERE ROWNUM < 10
These will give essentially random rows but generally this is just used for data exploration anyway, so not a big deal. If you want one specific row then use something like this:
WITH X AS (
SELECT *, ROW_NUMBER() OVER (ORDER BY SomeField) FROM table1
)
SELECT * FROM X WHERE RN = 1`
SELECT * FROM v$version WHERE banner LIKE 'Oracle%';