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 -> Re: CHAR vs VARCHAR

Re: CHAR vs VARCHAR

From: DA Morgan <damorgan_at_exxesolutions.com>
Date: Wed, 02 Apr 2003 09:55:09 -0800
Message-ID: <3E8B23FD.9DE7F9CF@exxesolutions.com>


Paul Pruchnik wrote:

> Greetings,
> What is the savings of CHAR(4) vs VARCHAR(4) for storing a 4 (required)
> character code? What is the overhead in using VARCHAR for fields of required
> length?
> Thanks,
> -Paul Pruchnik

My advice is to never use CHAR for any purpose. It saves no space, except perhaps for CHAR(1) and introduces string comparison problems that will drive you crazy and make trimming a way of life for years.

Unless you have a huge disk storage issue you think you can solve with a byte or two per record I'd forget CHAR exists.

Daniel Morgan Received on Wed Apr 02 2003 - 11:55:09 CST

Original text of this message

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