0

I tried to select the secondhighestsalary from the employee table, this was my go, but it returned

the SQL statement is not properly ended

select salary as secondhighestsalary from employee 
order by salary desc
offset 1 rows
fetch next 1 rows only;

What is the problem right there? Oracle SQL.

Thanks in advance.

MT0
  • 86,097
  • 7
  • 42
  • 90
  • Try this: `select salary as secondhighestsalary from employee WHERE rownum BETWEEN 1 and 1; order by salary desc ` – Hasan Fathi Jan 10 '21 at 10:51

1 Answers1

0

As far as I know this construction is supported starting Oracle 12 c Oracle 11g OFFSET FETCH gives error

Sergey
  • 963
  • 1
  • 2
  • 7