Re: Why not varchar2 = 2000?
From: <morleb_at_cbr.hhcs.gov.au>
Date: 25 Jan 95 16:01:29 +1000
Message-ID: <1995Jan25.160129.1_at_cbr.hhcs.gov.au>
Brian Morley morleb_at_cbr.hhcs.gov.au Dept Human Service & Health, Brisbane, Australia Received on Wed Jan 25 1995 - 07:01:29 CET
Date: 25 Jan 95 16:01:29 +1000
Message-ID: <1995Jan25.160129.1_at_cbr.hhcs.gov.au>
In article <3fa5gh$4rf_at_portal.gmu.edu>, dnguyeb_at_site.gmu.edu (Dong Duong Nguyen (CS 571)) writes:
> Hello,
> Can anyone tell me why a varchar2 field should not be defined to be
> a maximum of 2000 bytes. ORACLE will only store what is used anyway.
> So, why not define it to be a maximum.
>
There is slight storage penalty for using VARCHAR2 columns larger than 255 because 3 bytes must be used to record the length of the stored string instead of the usual 1 byte. Once you exceed 255, there is no penalty in going the whole hog and specifying 2000 (See Oracle 7 Server Administrator's Guide Chapter 8).
Brian Morley morleb_at_cbr.hhcs.gov.au Dept Human Service & Health, Brisbane, Australia Received on Wed Jan 25 1995 - 07:01:29 CET
