Create Table 的语法如下:
Create Table <数据表名>
(字段名一 数据类型 [NULL and NOT NULL]
......
[字段名N 数据类型 [NULL and NOT NULL]]
)
在表中加入字段的命令是 Alter Table ,其语法如下:
Alter Table <数据表名>
Add <字段名 数据类型 [NULL and NOT NULL]>
如:
Alter Table student1
Add Longname char(40) not null
将在表student1中加入一个类型为char长度为40,且能不允许为空值的字段.