Re: char vs varchar ?
Date: 1995/04/18
Message-ID: <Pine.NXT.3.90.950418142022.7159A-100000_at_iluvatar>#1/1
On Tue, 18 Apr 1995, Vinod Jain wrote:
> Hi,
>
> I want to know if there are any advantages of using "char" over "varchar" in
> Oracle tables or vice-versa. Which datatype is better ? I am working on an
> application which is using Powerbuilder as front end and Oracle 7.1.4 as
> backend. Does Powerbuilder give any problems with char field types ?
>
> I am mainly a Sybase person and Sybase encourages use of char fields over
> varchar fields, particularly if the field is short (say less than 10 characters), since
> varchar adds overhead.
>
From my understanding of Oracle. A field does not take up memory unless something is stored in that field. Unlike other programs that automatically allocate memory when it is declared. Also, a char field in Oracle will pad spaces to the end of all entries under the amount specified. So if you are doing a search on that field, you will have to include the spaces in your query.
John Jones | my views are my own......... Oracle Consultant | no matter what company they are john_at_iluvatar.tip.duke.edu | coming from. --------------------------------------------------------------------Received on Tue Apr 18 1995 - 00:00:00 CEST