Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: char versus varchar datatype
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