DiigIT | IT Community
No Profile Image
Welcome Guest
New User? Register | Login
IT Tags
DiigIT » Oracle »

Convert CLOB to BLOB

By: | 04 Sep 2008 11:20 pm

Convert CLOB to BLOB

I will write a procedure clob_blob_proc which convert description
column of test table of type clob to blob. Here is the procedure.

1)Create a Table with Clob Column:
------------ ------
SQL> create table test(id number, description clob);

Table created.

2)Insert a Value in it:
------------ ---------
SQL> insert into test values(1,'Hi' );

1 row created.

SQL> commit;

Commit complete.
3)Add a Blob Column:
------------ -------
SQL> alter table test add description1 BLOB;

Table altered.
 

Comments

By: | 22 Apr 2009
By: | 22 Apr 2009
By: | 22 Apr 2009
By: | 21 Jan 2010
By: | 21 Jan 2010

Leave a comment

Enter the text in the image
img
Can't read?
Type the characters you see in the picture below.


Close Move