Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Primary Key
Mabel Triguis wrote:
>
> Jim Anderson <janderson_at_ci.lincoln.ne.us> wrote in article
> <34B27718.808C9A10_at_ci.lincoln.ne.us>...
> > Is there any problem with using the - character as part of the primary
> > key? We are designing a database with a table that could have a primary
> > key of XX-XX-XXX-XXX-XXX or XXXXXXXXXXXXX. The first form is more
> > readable, but I am curious if anyone has had problems with this.
> >
> You will not have any problem if any 'X' is not null.
> In the case that 'X' coul be null, how are you going to fill it?
> like: AA-CC-BBB-BBB- - -
> you can have problems with the last spaces, and when you query it is going
> to be a nigthmare!.
> Consider also that depending of the size of your database you are using 4
> characters more.
Sure ! And remember that not only the size of THIS table will be impacted ! Consider as well the size of :
Depends if you really need the table to be "directly" read by someone ; but if I were you I would choose the XXXXXXXXXXX
-- Gregory Fabre Net Valley - 01 46 97 21 81 Gregory.Fabre_at_NetValley.frReceived on Wed Jan 07 1998 - 00:00:00 CST
![]() |
![]() |