17,377
社区成员
发帖
与我相关
我的任务
分享
-- drop table zchw purge;
create table zchw(
c1 char,
c2 varchar2(14),
c3 number(12)
);
alter table zchw add c4 number(3);
alter table zchw add c5 number(12);
update zchw set c5=c3;
alter table zchw drop column c3;
alter table zchw rename column c5 to c3;
-- 我执行怎么没有错误呢?
eygle@SZTYORA> drop table zchw purge;
表已删除。
eygle@SZTYORA> create table zchw(
2 c1 char,
3 c2 varchar2(14),
4 c3 number(12)
5 );
表已创建。
eygle@SZTYORA>
eygle@SZTYORA> alter table zchw add c4 number(3);
表已更改。
eygle@SZTYORA> alter table zchw add c5 number(12);
表已更改。
eygle@SZTYORA> update zchw set c5=c3;
已更新0行。
eygle@SZTYORA> alter table zchw drop column c3;
表已更改。
eygle@SZTYORA> alter table zchw rename column c5 to c3;
表已更改。
eygle@SZTYORA>