Re: Help, my developers are killing me with varchar2(4000)

From: DA Morgan <>
Date: Fri, 15 Aug 2008 09:34:13 -0700
Message-ID: <>

Noons wrote:
> DA Morgan wrote,on my timestamp of 15/08/2008 11:17 AM:

>>>> So what should the default size of a varchar2 be then?  7?  12?  
>>>> 23?  0?
>>> does it really matter?  it's variable length anyway:
>>> the size is a constraint, not an allocation issue.
>> As with many things ... depends ...
>> For example when working with bind variables VARCHAR2s are rounded to
>> the next highest length that can be 32 bytes, 128 bytes, 2000 bytes,
>> or 4000 bytes.

> I don't think VARCHAR2s are rounded up at all in the
> tables, which is what I thought we were talking about.
> Sure: a bind variable might "adjust" the length of a
> VARCHAR2 parameter, but that does not replace the table
> column's definition in the dictionary?
> IOW: the bind variable might not store data very efficiently
> but the column in the table doesn't stop having its max
> size checked because of that?

I specifically said "bind variables." My intention was to be clear and concise and to indicate that in some cases it does matter with respect to allocation.

Daniel A. Morgan
Oracle Ace Director & Instructor
University of Washington (replace x with u to respond)
Puget Sound Oracle Users Group
Received on Fri Aug 15 2008 - 11:34:13 CDT

Original text of this message