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

Thread: auto increment/sequence

  1. #1
    Join Date
    Nov 2004
    Posts
    1

    auto increment/sequence

    I'm newbee in Oracle 9i forms. I have a created a form which has a award tracking number (primary key). When a user adds a record, the award tracking number should automatically increment at time of row insert.
    1) How can this be done ?
    2) What if more than 1 user adding records, how will the award tracking no. get updated ?
    3) Can I display the tracking no. at time of entry ?
    I was told to use sequences. Is this the right solution ? If yes, How do I use it ?

    Please help.

    Thanks
    Raj

  2. #2
    Join Date
    Nov 2000
    Location
    Pittsburgh, PA
    Posts
    4,166
    Your question isn't really a Forms question per se. If it were me I would create a sequence and then create an row level before insert trigger which populates the sequence. Then when you do an insert specify the returning clause if you want to know the sequence. A sequence is guaranteed to return a unique value everytime it is called.

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