Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> varchar2 and primary keys
In general use varchar2 over char except for single character fields. varchar2 is easier to work with and I do not think there is any measureable performace hit.
As for using varchar2 for primary keys, I would recommend that you stick with abstract sequence numbers using Oracle sequence generator.
-lane
Neil Boemio wrote:
> Hello
>
> I was taking a look at a few of the system tables and it seems that
> Oracle never uses CHAR, only VARCHAR2. Of course I haven't looked at
> EVERY table but all the ones I have looked at use VARCHAR2. So I was
> thinking .... if Oracle does this, maybe I should too. I told someone
> else that I was going to do this and they didn't think it was a good
> idea, especially for primary keys. I don't know .... would this cause a
> problem? Is anyone else using VARCHAR2 over CHAR? Thanks.
>
> \\|// \\\|///
> (0-0) ( o o )
> +===oOO===(_)===========================oooO==(_)==Oooo=======+
> | |
> | Neil Boemio |
> | nboemio_at_bway.net |
> | http://www.bway.net/~nboemio/ ooo0 |
> | ( ) Oooo. |
> +================oOO=====================\ (====( )=========+
> |__|__| \_) ) /
> || || (_/
> ooO Ooo
-- Lane Sharman "Put those together less bad, but the cage less fun." HobbesReceived on Mon Sep 15 1997 - 00:00:00 CDT
![]() |
![]() |