Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Should I use PK or Unique Index in this table ?
"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