SQL向基本表中增加一个新列后?默认是空的。除非你这个新加的列, 是 NOT NULL , 并且设置了 DEFAULT例子代码如下:mysql> create table test11(id int)Query OK
SQL向基本表中增加一个新列后?
默认是空的(pinyin:de)。
除(澳门银河读:chú)非你这个新加的列, 是 NOT NULL , 并且设置了 DEFAULT
例[澳门金沙练:lì]子代码如下:
mysql> create table test11(id int)Query OK, 0 rows affected (0.01 sec)
Query OK, 1 row affected (0.00 sec)
mysql> ALTER TABLE test11 ADD name varchar(10) not null default "ABC"
Query OK, 1 row affected (0.02 sec)
------ ------
| id | name |
------ ------
| 100 | ABC |
------ ------
1 row in set (0.00 sec)
本文链接:http://10.21taiyang.com/Shooter-GamesGames/11961209.html
sql增加列(pinyin:liè)并指定其属性转载请注明出处来源