第一种方法:
(1).create table new_table as select to_number(clip_stime) clip_stime,clip_path from vf_clipinfo;这里我们要改字段clip_stime的类型为number
(2).重建相关的索引和约束等.
第二种方法:
(1).exp现有表
(2).truncate table
(3).alter table table_name modify column new_type;
(4).imp DMP文件.
第三种方法:
(1).增加新列 alter table table_name add new_col;
(2).更新新列 update tablename set new_col=old_col;
(3).删除旧列alter table table_name drop column old_col;
(4).修改新列名为原来表的列名 alter table tablename rename column new_col to old_col;
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/7478833/viewspace-374927/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/7478833/viewspace-374927/