Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Convert CLOB column to VARCHAR2 data type

618523Jan 18 2008 — edited Jan 18 2008
My knowledge of writing SQL code for Oracle doesn't go far beyond creating basic tables and relationships. I have a situation where I need to convert a column in a table with data in it from CLOB to VARCHAR2. While I know this statement does not work, I would essentially like to accomplish this:

ALTER TABLE table1
MODIFY clob_column VARCHAR2(1000);

This needs to be done with SQL code in SQL*Plus. The Oracle version is 9i. I am guessing I would need to create the VARCHAR2 column and then somehow move the data over and then drop the CLOB column. An example of how you would accomplish this in SQL*Plus would be greatly appreciated. Thanks!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 15 2008
Added on Jan 18 2008
3 comments
1,000 views