YoannD

SQL : Oracle counter table

Blog Post created by YoannD Employee on Apr 23, 2018

Here a very simple SQL sentence to create a "counter table". In fact it will generate a table with value between 1 and 10, then you can use it via standard SQL relation to perform joins, math or whatever...

 

SELECT LEVEL MyCounter FROM DUAL CONNECT BY LEVEL <= 10;

 

Enjoy

Outcomes