??创建表的语法
-创建表格语法:
create
table
表名(
????
字段名1??
字段类型(长度)
是否为空,
????
字段名2??
字段类型????????????
是否为空);-增加主键
alter
table
表名
add
constraint
主键名
primary
key
(字段名1);-增加外键:
alter
table
表名
????
add
constraint
外键名
foreign
key
(字段名1)
??????????
references
关联表
(字段名2);
在建立表格时就指定主键和外键
create
table
t_stu??
(