Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> varchar2 and primary keys

varchar2 and primary keys

From: Lane Sharman <lane_at_san.rr.com>
Date: 1997/09/15
Message-ID: <341D837F.2CEF33C3@san.rr.com>#1/1

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."
Hobbes
Received on Mon Sep 15 1997 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US