Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2006
    Posts
    9

    Unanswered: Creating table with unique auto-number primary key

    Hi all,

    I need to create a table with a primary key which is auto-numbered and unique.

    Can anybody advise?
    Not sure if there is an out of the box function for this or if I need to create triggers and other tables etc.

    I am running Oracle 9.2.0.4

    Thanks in advance,
    Matt

  2. #2
    Join Date
    Nov 2003
    Posts
    2,935
    Provided Answers: 12
    You need to create a SEQUENCE and fill the value for the column in question in an INSERT trigger. Other tables are not required.

    Btw: why are you running such an old Oracle version?

  3. #3
    Join Date
    Oct 2006
    Posts
    9
    we are in the process of upgrading our Clarity system which will be using 10.2.0.4, but our old one is just on 9.2.0.4.
    I'm assuming our version of 10 is also old?
    my company seems to take YEARS to get up to date with things.

    We use Lotus Notes, which in itself is a mystery, let alone the fact that we are on version 6.5, which is years old!!!

  4. #4
    Join Date
    Nov 2003
    Posts
    2,935
    Provided Answers: 12
    Quote Originally Posted by matpj
    I'm assuming our version of 10 is also old?
    Sort of

    The current release is 11g Release 2, which is 3 versions after 10g Release 1

Posting Permissions

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