1. Write a query to get the below output,
1 | 11 | 21 | 31 | .. | .. | 91 |
2 | 12 | 22 | 32 | .. | .. | 92 |
3 | 13 | 23 | 33 | .. | .. | 93 |
.. | ||||||
.. | .. | .. | .. | .. | .. | .. |
.. | .. | .. | .. | .. | .. | .. |
10 | 20 | 30 | 40 | 100 |
Ans:
select level,level+10,level+20,
level+30,level+40,level+50,
level+60,level+70,level+80,
level+90
from dual connect by level <=10;
2. Write a query to generate tables from 7 to 70.
Like, 7,14,21....8,16,24...9,18,27......70,140,210.
Ans:
Select a.a*b.b from
(select level+6 a from dual connect by level <=64) a,
(select level b from dual connect by level <=10) b;
And there are many more.............