Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: primary key
Why have a 'constant' in a primary key? The 'real' primary key is the second column. It must be unique in and of itself. A check constrain is cheaper than a column in a primary key.
Why even have it in the table?
Frank Leenders wrote:
Hello all,Received on Wed Nov 25 1998 - 15:43:15 CSTdue to our development tool we will have a table with a primary key
consisting of two columns and the first column containing always the same
value. Will this influence the efficiency of the optimizer or influence the
statistics in a bad way? Will the index be build in an inefficient way?Thanx
Frank