SQL向基本表中增加一个新列后?默认是空的。除非你这个新加的列, 是 NOT NULL , 并且设置了 DEFAULT例子代码如下:mysql> create table test11(id int)Query OK
SQL向基本表中增加一个新列后?
默认(繁:認)是空的。
除非你这个新加的[练:de]列, 是 NOT NULL , 并且设置了 DEFAULT
例子代码[繁:碼]如下:
mysql> insert into test11 values(100)
mysql> ALTER TABLE test11 ADD name varchar(10) not null default "ABC"
mysql> select * from test11
| id | name |
------ ------
| 100 | ABC |
------ ------
1 row in set (0.00 sec)
本文链接:http://21taiyang.com/SoccerSports/11961209.html
sql增加列并指(练:zhǐ)定其属性转载请注明出处来源