Re: Unique rec. ID advice needed

From: <Patrick>
Date: 1996/04/16
Message-ID: <4l0bus$bpm_at_doc.zippo.com>#1/1


In article <4ku88k$6qu_at_earth.superlink.net>, slv_at_superlink.net says...
>
>What is the best way to build unique record IDs such as Product ID to use
>for reference from Sales table? The ID should be assigned automatically
>by the program every time a new Product is added to the Product table.
>
>1. Should I use Number or Varchar2 or Char field?
>2. If I use a character ID, should I add leading zeros to fill the blanks?
>3. What is the best way to generate IDs in a multiuser environment?
>Should I keep a separate MaxCurrentID table and lock it every time I
>generate next ID?
>
>Any practical advice appreciated.
>
>Stan.

In Oracle7, make your unique ID an integer, and use a sequence to populate the field.

   -Pat Connors Received on Tue Apr 16 1996 - 00:00:00 CEST

Original text of this message