My god sometime I bang my head on the wall to do something simple on oracle. So oracle don’t support limit so to do something simple has :
SELECT f_name, l_name, age from employee_data ORDER BY age DESC LIMIT 20
become :
SELECT f_name, l_name, age FROM ( SELECT f_name, l_name, age, ROWNUM r FROM ( SELECT f_name, l_name, age FROM employee_data ORDER BY age DESC ) WHERE ROWNUM <= 40 ) WHERE r >= 21;
Recent Comments