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

Home -> Community -> Usenet -> c.d.o.misc -> Re: VARCHAR2 greater than 4K?

Re: VARCHAR2 greater than 4K?

From: Anurag Varma <avdbi_at_hotmail.com>
Date: Wed, 06 Aug 2003 04:26:59 GMT
Message-ID: <ms%Xa.27807$QY6.2086@news02.roc.ny>

"Mikito Harakiri" <mikharakiri_at_ywho.com> wrote in message news:SQWXa.16$6O5.112_at_news.oracle.com...
> "Anurag Varma" <avdbi_at_hotmail.com> wrote in message
> news:LKVXa.27506$r61.9329_at_news02.roc.ny...
> > Max length for a varchar2 column is 4000 bytes.
>
> OK. They can motivate that by storage design.
>
> > Max length for pl/sql varchar2 datatype is 65535 bytes.
>
> But I wonder how do they motivate this limitation, given that any decent
> language have a type String of unrestricted length (no string attached;-)
> Are they still living in 16 bit world?
>
> > Define column as CLOB if you need a bigger column size.
>
> Three datatypes for a character string? That's a little bit too much.
>
> Here is small example demonstrating how ridiculous LOB implementation is:
>
> SQL> select substr('hello world', 1, 4) from dual;
>
> SUBS
> ----
> hell
>
> SQL> select dbms_lob.substr('hello world', 1, 4) from dual;
>
> DBMS_LOB.SUBSTR('HELLOWORLD',1,4)
> --------------------------------------------------------------
> l
>

Slightly confusing I'd admit.
dbms_lob.substr has the parameters reversed. "select dbms_lob.substr('hello world', 4, 1) from dual"

You can however use the normal substr on CLOB's also (instead of getting all confused).

Anurag Received on Tue Aug 05 2003 - 23:26:59 CDT

Original text of this message

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