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

Home -> Community -> Usenet -> c.d.o.server -> Re: char versus varchar datatype

Re: char versus varchar datatype

From: John Strange <jstrange_at_imtn.dsccc.com>
Date: 18 Feb 1999 18:49:18 GMT
Message-ID: <7ahnbe$3sr$1@relay1.dsccc.com>


My misunderstanding is that char fields are right padded with spaces which would have to be added if I wanted to query without wildcards.

So if I wanted to count records containing DOG in a char field, I would have to

        select count (*) from some_table where type = 'DOG ' ; instead of

        select count (*) from some_table where type = 'DOG' ; if it was varchar2 .

Frank Leenders (ftleenders_at_hotmail.com) wrote:
: Hello all,
: this question probably has been asked before, but I missed the answer.
: What arguments are there for the choice between a CHAR field in a table and
: a VARCHAR datatype?
: Of course, varchar has a variable length and that means less used space. On
: the other hand a length byte is added and maybe it takes more time to find
: the correct column in a block when all fields have a variable length. Or
: .......?
: Thanx
: Frank

--
While Alcatel may claim ownership of all my ideas (on or off the job), Alcatel does not claim any responsibility for them. Warranty expired when u opened this article and I will not be responsible for its contents or use. Received on Thu Feb 18 1999 - 12:49:18 CST

Original text of this message

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