Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Primary Key
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.
>
> Thanks,
> Jim Anderson
>
>
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.
Why not just format the input/output more readable?
Received on Tue Jan 06 1998 - 00:00:00 CST