Re: Oracle datatypes - what to use?

From: John Jones <jmj22026_at_us0n05.glaxo.com>
Date: 1996/07/16
Message-ID: <31EBFE8B.376F_at_us0n05.glaxo.com>#1/1


Robert Risholm wrote:
>
> We are building a datawarehouse with Oracle 7.3, thus all fields will be
> read only.
>
> Could someone recommend what datatypes for:
>
> Character data:
>
> Should we use VARCHAR2 for all character type data? Even for the 1 or 2
> byte fields.
> That is what some people have advised. Does putting a maximun length on
> the VARCHAR2
> buy you anything?

 I would advise to use varchar2 on all fields and put the precision on them. Regular varchar pads the remainging length with hard coded spaces, and then if you want to query them you have to include the spaces. I use varchar2 even on length of 1. It just keeps me in the habit of using them.

>
> Numeric data:
>
> Can we use plain NUMERIC as the data type for all numberic fields.
> Does designating precision and the number of decimals buy you anything?
>
> Thank you

Not sure about this one. If you know the decimal precision, I would use it.

John Jones
Oracle Consultant
jmj22026_at_us0n05.glaxo.com Received on Tue Jul 16 1996 - 00:00:00 CEST

Original text of this message