Thread: oracle

    #1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2003
    Location
    Ajmer, Rajasthan, India
    Posts
    1
    Rep Power
    0

    Smile oracle


    hi ....

    i have just started oracle...........guide
    how to generate fibonacci series using oracle.
  2. #2
  3. No Profile Picture
    Senior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2003
    Location
    Canada
    Posts
    305
    Rep Power
    11
    You can use the oracle CRAETE SEQUENCE command to generate the sequencies no matter in Ascending or Descending order the complete command as follows:

    SQL>CREATE sequence EMP_SEQ
    START WITH 1
    MINVALUE 1
    MAXVALUE 10000
    INCREMENT BY 1
    NOCYCLE
    NOCHACHE
    /

    The above example will generate a sequence with name EMP_SEQ and the first number of this sequnce will be start with 1 and its minimum values is 1, this sequence will stop generating sequence whenever it reaches the maxvalue i,e 10000, interval between two numbers of the sequnce is 1. this sequence generate the numbers like that:
    1 2 3 4 5 6 7 .......................................10000

    Regards,

IMN logo majestic logo threadwatch logo seochat tools logo