Home > database >  Nasty, strives for the great god write PLSQL script implement multiple modify table field types in t
Nasty, strives for the great god write PLSQL script implement multiple modify table field types in t

Time:09-27

Demand is like that, I find a list of all tables stored inside a tableName, in the three fields, which are these tableName from clob modified into varchar2, want to use PLSQL programming implementation, thank you!!!!!

CodePudding user response:

refer to the original poster kobelieve11 response:
requirements, I checked into a table to store all of the name of the table tableName, in the three fields, which are these tableName from clob modified into varchar2, want to use PLSQL programming implementation, thank you!!!!!

The three fields are fixed, only cycle changes all take out the table

CodePudding user response:

http://www.cnblogs.com/david-zhang-index/archive/2012/04/10/2441015.html wish I can help you,

CodePudding user response:

refer to the second floor qq_40023043 response:
http://www.cnblogs.com/david-zhang-index/archive/2012/04/10/2441015.html wish I can help you,

There are data in the table, so can't modify the field type directly

CodePudding user response:

You look down the content carefully, especially the second approach, this is in view of the field have a content, I modify success yesterday,

CodePudding user response:

If it is to date other types of words, I tried to use to_date also succeeded,

CodePudding user response:

reference 4 floor qq_40023043 response:
you see down below the content, especially the second approach, this is in view of the field have a content, I modify success yesterday,

Good, content ~

CodePudding user response:

reference 5 floor qq_40023043 reply:
if it is to date other types of words, I tried to use to_date also succeeded,

I also know that the method is to build a temporary table, main is I now can't write PLSQL script cycle change ~

CodePudding user response:


The alter table table name add new fields varchar2 (10);

Update the table name set new field=the original, the original field=null;

The alter table table name modify the original field varchar2 (10);

The update table name set original=new field, new fields=null;

The alter table table name drop column new fields

Is to remove the field data of change, and change the data type, move back,