HOW TO DISPLAY 5 TO 7 ROWS FROM A TABLE?

Oracle Apps Interview QuestionsCategory: SQLHOW TO DISPLAY 5 TO 7 ROWS FROM A TABLE?
Questions Master asked 10 years ago

how to display 5 to 7 rows from a table?

1 Answers
Shailender Thallam Staff answered 10 years ago

SELECT ename
FROM emp
WHERE rowid IN
  (SELECT rowid FROM emp WHERE rownum<=7
  MINUS
  SELECT rowid FROM emp WHERE rownum<5
  );