Skip to content

Instantly share code, notes, and snippets.

@slamotte
Created April 19, 2011 18:13
Show Gist options
  • Save slamotte/929111 to your computer and use it in GitHub Desktop.
Save slamotte/929111 to your computer and use it in GitHub Desktop.
Technique for changing a clob to varchar2 in Oracle without dropping/recreating table or altering column positions.
alter table t add c2 varchar2(4000);
update t set c2 = c;
update t set c = null;
commit;
alter table t modify c long;
alter table t modify c clob;
update t set c = c2;
alter table t drop column c2;
commit;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment