17,086
社区成员
发帖
与我相关
我的任务
分享
SQL> select * from test;
C1 C2 C3
---------- ---------- ----------
1 0 0
2 0 0
SQL> desc test
名称 是否为空? 类型
----------------------------------------- -------- ----------------------------
C1 NUMBER(38)
C2 NOT NULL NUMBER(25,6)
C3 NUMBER(25,6)
SQL>
SQL> col c1 format 0000;
SQL> create table test(c1 int);
Table created
SQL> insert into test(c1) values(1);
1 row inserted
SQL> alter table test add c2 number(25,6) default 0 not null;
Table altered
SQL> alter table test add c3 number(25,6) default 0;
Table altered
SQL> insert into test(c1) values(2);
1 row inserted
SQL> select * from test;
C1 C2 C3
---- --------------------------- ---------------------------
1 0.000000 0.000000
2 0.000000 0.000000
SQL> drop table test purge;
Table dropped
SQL>