I need a resultset with 10 rows from dual
Which is the easiest SELECT I have to write, when the question is: "I need a resultset with 10 rows from dual"
one solution is
SELECT 'X' FROM EMP WHERE ROWNUM <= 10;
problem: if emp has fewer than 10 rows, I have an incorrect resultset
another problem: if I need 1000 and not 10 dummy-rows, than is emp definitely the wrong way, because the default-emp table has only 14 rows.
Is there an easy generic solution for this problem? If I need only one row, Oracle has the workaround with the DUAL-table.