ORACLE SQL:Get all integers between two numbers

前端 未结 13 1262
说谎
说谎 2020-12-03 13:42

Is there any way to select the numbers (integers) that are included between two numbers with SQL in Oracle; I don\'t want to create PL/SQL procedure or function.

Fo

13条回答
  •  隐瞒了意图╮
    2020-12-03 14:16

    This trick with Oracle's DUAL table also works:

    SQL> select n from
      2  ( select rownum n from dual connect by level <= 10)
      3  where n >= 3;
    
             N
    ----------
             3
             4
             5
             6
             7
             8
             9
            10
    

提交回复
热议问题