select round(long_w,4)
from station
where lat_n < 137.2345
order by lat_n desc
limit 1;
this query give
- ERROR at line 1: ORA-00933: SQL command not properly ended
fix this error
select round(long_w,4)
from station
where lat_n < 137.2345
order by lat_n desc
limit 1;
this query give
- ERROR at line 1: ORA-00933: SQL command not properly ended
fix this error
Oracle does not support limit
and you are getting an Oracle error. You can instead use:
select round(long_w, 4)
from station
where lat_n < 137.2345
order by lat_n desc
fetch first 1 row only;
fetch
was introduced in Oracle 12. You can also use the keep
syntax:
select max(round(long_w, 4)) keep (dense_rank first order by lat_n desc)
from station
where lat_n < 137.2345;