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

Home -> Community -> Usenet -> c.d.o.server -> Re: Selecting LONG RAWs

Re: Selecting LONG RAWs

From: Anthony Jackson <ajackson_at_et.byu.edu>
Date: Thu, 18 Jul 2002 10:14:40 -0600
Message-ID: <3D36E970.8060302@et.byu.edu>


>
> I hope you meant a 32K limit on VARCHAR2.
>

Yes, VARCHAR2 does have a 32k limit, but take a look at this quote taken from the Oracle Documentation. (please excuse the length, it might be useful)

"LONG and LONG RAW

You use the LONG datatype to store variable-length character strings. The LONG datatype is like the VARCHAR2 datatype, except that the maximum length of a LONG value is 32760 bytes.

You use the LONG RAW datatype to store binary data or byte strings. LONG RAW data is like LONG data, except that LONG RAW data is not interpreted by PL/SQL. The maximum length of a LONG RAW value is 32760 bytes.

You can insert any LONG value into a LONG database column because the maximum width of a LONG column is 2147483647 bytes. However, you cannot retrieve a value longer than 32760 bytes from a LONG column into a LONG variable.

Likewise, you can insert any LONG RAW value into a LONG RAW database column because the maximum width of a LONG RAW column is 2147483647 bytes. However, you cannot retrieve a value longer than 32760 bytes from a LONG RAW column into a LONG RAW variable. " --PL/SQL User's Guide and Reference Release 8.1.5 A67842-01

 >
 > But, as Oracle is dropping them, you should to. Use CLOB and BLOB instead
 > and use the DBMS_LOB package for access.
 >

It's too bad that I can't change the datatype. The DBA from a different department controls that. I've just got to deal with it until they figure out the hard way that LOBs are better. (Like I hinted to in my original post.)

 > LONG RAW is binary information ... think C or Java.

BTW, Morten posted a solution in PL/SQL (and Java) that looks promising.

Thanks,

Anthony Received on Thu Jul 18 2002 - 11:14:40 CDT

Original text of this message

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