Re: Which one should I use: varchar() or char()?

From: gazzag <gareth_at_jamms.org>
Date: Mon, 5 Oct 2009 00:29:25 -0700 (PDT)
Message-ID: <0fd4fbdf-7172-428d-a4c8-34e8f97f9805_at_j19g2000vbp.googlegroups.com>



On 4 Oct, 16:06, Palooka <nob..._at_nowhere.com> wrote:
> On 04/10/09 13:53, Ramon F Herrera wrote:
>
> > I inherited a bunch of database tables and just noticed that for
> > historical reasons, one of the important tables has records based on
> > varchar(), and the other on char().
>
> > Note: I have never been able to come to grips with PL/SQL and
> > essentially all my database access (except for table creation and
> > table loading) is done through Pro*C/C++.
>
> > What are the trade-offs between char() and varchar()? Which one should
> > I use?
>
> Use varchar2 unless you have a very good reason not to. A char is just a
> varchar2 padded with spaces.
>
> Palooka

http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/sql_elements001.htm#i54330

HTH -g Received on Mon Oct 05 2009 - 02:29:25 CDT

Original text of this message