DBAsupport.com Forums - Powered by vBulletin
Results 1 to 6 of 6

Thread: Sequence

Hybrid View

  1. #1
    Join Date
    Dec 2001
    Posts
    19
    ok, I have an order form and need to add an order but now need a sequence number. i know the code goes something like

    create sequence order
    start with 1000 increment by 1;

    How do i get this to increment by one? Or is that code wrong?

    Thanks for any help!!!

  2. #2
    Join Date
    Oct 2000
    Location
    Germany
    Posts
    1,185
    Try

    create sequence blablabla
    increment by 1
    start with startnumber;

    Good Luck.
    David Knight
    OCP DBA 8i, 9i, 10g

  3. #3
    Join Date
    Oct 2001
    Location
    Pelham, AL
    Posts
    40
    Every time you select sequence.nextval, the sequence is automatically incremented by the database.

  4. #4
    Join Date
    Dec 2001
    Posts
    19

    thanks

    you guys are awesome. and fast!!!!

    Digiaks "future Oracle DB adm"

  5. #5
    Join Date
    Dec 2001
    Posts
    19

    sequence

    okay, i created the sequence. buuuuttt (i am stupid). how do you use it??


    INSERT into table1
    value(sequence?)

    thanks

  6. #6
    Join Date
    Jun 2001
    Location
    Helsinki. Finland
    Posts
    3,938

    Re: sequence

    Originally posted by digiaks
    okay, i created the sequence. buuuuttt (i am stupid). how do you use it??


    INSERT into table1
    value(sequence?)

    thanks
    INSERT into table1
    value(sequence_name.nextval);


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width