Changing CLOB fields to VARCHAR2 fields

To change a CLOB field to a VARCHAR field in Oracle create a

temporary column (varchar) to hold the cast. Execute the following
command and then rename drop the old one and rename the new column:

UPDATE table SET tempcol = dbms_lob.substr(column, 10, 1)

Where 10 is the length of the column and 1 is the starting position of th
CLOB string.

No comments: