Paginating is nothing but controlling the no. of records in the result set eg: fetch first 5 records, fetch 10 to 20 records, etc., Employees -Table EMPLOYEE_ID FIRST_NAME SALARY ----------- -------------------- ---------- 100 Steven 24000 101 Neena 17000 102 Lex 17000 103 Alexander 9000 104 Bruce 6000 105 David 4800 106 Valli 4800 107 Diana 4200 1) Below query fetches first 5 records of the table order by highest salary. ( 'fetch next n rows' clause is supported from Oracle 12c onwards). select e.employee_id, e.first_name, e.last_name, e.salary from employees e order by e.salary desc fetch next 5 rows only ; EMPLOYEE_ID FIRST_NAME LAST_NAME ...
Comments
Post a Comment