Re: VARCHAR2 vs. CHAR
Date: 1996/11/23
Message-ID: <575k63$hb0_at_news.sas.ab.ca>#1/1
Hi Martyn:
If I need to pass parameters to other application e.g. C, which one should be the best to use?
Bes regards,
Sui-sum
Martyn Cavett (cavett_at_globalnet.co.uk) wrote:
: VARCHAR2 is efficient in storing strings. It holds 1 extra byte to
: indicate a column end and space is not taken for any string length less
: than the column size.
: For example:
: In a VARCHAR2(50) column the string 'ABCDE' would take up 6bytes
: whereas a CHAR(50) column would take up 51 bytes irrespective of the data.
: The only reason you may want to use a CHAR column is if you are doing
: string literal comparisons where WHITESPACES (blanks) are an important
: consideration. Normally this is not the case.
: Hope this has been of use to you.
: Martyn Cavett
: home: cavett_at_globalnet.co.uk
: work: Martyn.Cavett_at_gtplc.com
: Yudong Sun <ysun_at_econnect.ca> wrote in article
: <32948023.1CFB_at_econnect.ca>...
: > How efficient is VARCHAR2's implementation?
: > Would I have a reason to prefer the use of CHAR for things like
: > a person name (e.g., CHAR(50))? (I would use VARCHAR2 for things
: > like file path - e.g. VARCHAR2(256).)
: >
: > Thanks a lot,
: >
: > Yudong
: >
Received on Sat Nov 23 1996 - 00:00:00 CET