ORACLE SQL:Get all integers between two numbers

前端 未结 13 1289
说谎
说谎 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:09

    You can use the MODEL clause for this.

    SELECT c1 from dual
      MODEL DIMENSION BY (1 as rn)  MEASURES (1 as c1)
      RULES ITERATE (7)
      (c1[ITERATION_NUMBER]=ITERATION_NUMBER+7)
    

提交回复
热议问题