Mega Code Archive

 
Categories / Oracle PLSQL Tutorial / System Packages
 

Use dbms_lob getlength and dbms_lob substr with blob type column

SQL> SQL> create table demo   2  ( id           int primary key,   3    theBlob      blob   4  )   5  / Table created. SQL> SQL> select id, dbms_lob.getlength(theBlob) len, clean(theBlob) piece, dbms_lob.substr(theBlob,40,1) raw_data   2  from demo   3  where id =1   4  / no rows selected SQL> drop table demo; Table dropped.