1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

Print the numbers in the following format:

Discussion in 'SQL PL/SQL' started by Siddhartha, Jul 30, 2016.

  1. Siddhartha

    Siddhartha Active Member

    Messages:
    16
    Likes Received:
    2
    Trophy Points:
    90
    Location:
    Bangalore
    1 2 3
    4 5 6
    7 8 9
     
  2. Vicky

    Vicky Forum Advisor

    Messages:
    261
    Likes Received:
    11
    Trophy Points:
    260
    Location:
    Chennai
    This Works Sid..

    Code (SQL):

    SELECT SUBSTR ( '123456789' , (3 * LEVEL) -2, 3) FROM dual CONNECT BY LEVEL <= round(LENGTH ('123456789') / 3);
     
    Code (SQL):

    SUB
    ---
    123
    456
    789