Re: SQLDeveloper and CLOBs

  • From: Mark Bobak <Mark.Bobak@xxxxxxxxxxxx>
  • To: "frasebook4@xxxxxxxxx" <frasebook4@xxxxxxxxx>, "oracle-l@xxxxxxxxxxxxx" <oracle-l@xxxxxxxxxxxxx>
  • Date: Fri, 25 Apr 2014 15:38:57 +0000

VARCHAR2 SQL datatype, the kind you use in building a table (create table 
blah(col_a varchar2(4000)), is limited to 4000.  VARCHAR2 PL/SQL datatype, I.e. 
Variable defined as VARCHAR2 in a PL/SQL block, is limited to 32,767.

If you have a table with a CLOB type, and you do: select clob_column from 
some_table, that's yet another thing.  The SQL*Plus client has a couple of 
parameters, LONG and LONGCHUNKSIZE.  If you select a CLOB column directly, 
using SQL*Plus, the LONG parameter limits the total length of the data that 
will be returned, and it's capped at 2,000,000 bytes.  The LONGCHUNKSIZE is  
the size of the chunk, in BYTES, that will be used to pass back the CLOB.  So, 
under the covers, the SQL*Plus client is doing some CLOB handling for you, and 
dalign with multiple database fetches and assembling the chunks received from 
the database.

Hope that helps,

-Mark

From: nico torres <frasebook4@xxxxxxxxx<mailto:frasebook4@xxxxxxxxx>>
Reply-To: "frasebook4@xxxxxxxxx<mailto:frasebook4@xxxxxxxxx>" 
<frasebook4@xxxxxxxxx<mailto:frasebook4@xxxxxxxxx>>
Date: Friday, April 25, 2014 at 11:19 AM
To: "oracle-l@xxxxxxxxxxxxx<mailto:oracle-l@xxxxxxxxxxxxx>" 
<oracle-l@xxxxxxxxxxxxx<mailto:oracle-l@xxxxxxxxxxxxx>>
Subject: SQLDeveloper and CLOBs

Hi, I am new to LOB datatypes and I have a question about it:

I've read that in order to get clob data from the database, you need to get it 
done in groups of 4000 characters, because of VARCHAR2 limitations.

Now, to my surprise, I just made a select clobcolumn from mytable, without 
anything else, in Sqldeveloper, and it got the whole file

Could anyone explain this to me?


Thanks!

Other related posts: