If:
Make changes to the table field type.
For example, the table name is a, the field is A_name
field compatibility can be modified directly! In this case of incompatibility, there will be an error message:ORA-01439: To change the data type, the column to be modified must be empty
1 My scene is to convert the Varchar2 to CLOB, the following is the implementation process2 3 //rename A_name to A_name14 ALTER TABLEA RENAMECOLUMNA_nameto a_name1;5 6 //Add new Field A_name7 ALTER TABLEAADDa_name CLOB;8 9 //Transfer of ValuesTen UPDATEASETERROR=TRIM (a_name1); One A //Delete the original field, the data has been transferred to the specified field. - ALTER TABLEADROP COLUMNa_name1;
1 the usage of the General Action Field also has the following points:2 3 --Add New Field4 ALTER TABLEAADDcolumn_name Number;5 6 --Modify Field Length7 ALTER TABLEA MODIFY column_name Number(Ten); 8 9 --Modify Field namesTen ALTER TABLEA RENAMECOLUMNcolumn_name tocolmn_name_new; One A --Delete the specified field - ALTER TABLEADROP COLUMNcolumn_name
These are the basic uses of the field of the action table.
Oracle modifies the original field type