Harry Manoharan
Harry Manoharan

Reputation: 181

Clob functions doesn't work in Oracle 19.3.0.0

I have been trying to use different functions on clob datatype in oracle 19.3.0.0 and none of them return values.

eg : -

dbms_lob.getlength(clob_data)

However any kind of functions on clob/blob datatype doesn't return values

length(clob_data)

These functions have been working fine previously in Oracle 12c. I recently upgraded to Oracle 19.3.0.0. Please educate me if there is any work around for this.

Upvotes: 0

Views: 1174

Answers (1)

user9950041
user9950041

Reputation:

If you don't want to insert anything in clob column you should use empty_clob function

Test case

   SQL> create table test1 (id number,a clob);
    
    Table created.
    SQL> insert into test1 values (&id,&a);
    Enter value for id: 1
    Enter value for a: null
    
    1 row created.
    
    SQL> /
    Enter value for id: 2
    Enter value for a: empty_clob()
    
    1 row created.
    
    SQL> commit;
    
    Commit complete.

SQL> select id,dbms_lob.getlength(a) length from test1;

        ID     LENGTH
---------- ----------
         1                     
         2          0

Upvotes: 2

Related Questions