Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Should I use PK or Unique Index in this table ?

Re: Should I use PK or Unique Index in this table ?

From: Alan <alan_at_erols.com>
Date: Tue, 28 Sep 2004 14:24:14 -0400
Message-ID: <2rtoigF1e322lU1@uni-berlin.de>

"xtanto" <krislioe_at_gmail.com> wrote in message news:e1c9bd55.0409272116.24fbae06_at_posting.google.com...
> Hi gurus,
>
> I have a employee table, when an employee firstly input into the
> system, he/she does not have Emp_Number yet, after some approval
> process only then Emp_Number is generated.
>
> Question is : since Emp_Number can be null at first, should I have PK
> on this table ? or just Unique Index ?
>
> Thank you,
> xtanto

Assign a unique temporary emp_number that you know will never be a valid emp_number. For examlpe, if you know that the values will always be numeric, use an alpha in the data. But here's a thought- maybe they should not be in the employee table until they are actually an employee? Received on Tue Sep 28 2004 - 13:24:14 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US