|||
DDL:数据定义语言
create drop truncate alter
DCL:数据控制语言
grant revoke
DML:数据操作语言
delete update insert
INSERT增加新行,INSERT INTO table[column...] VALUES (value...);
-
增加主键
alter table
表名
add constraint
主键名
primary key (
字段名
1);
-
增加外键
:
alter table
表名
add constraint
外键名
foreign key (
字段名
1)
references
关联表
(
字段名
2);
增加主键
alter table 表名 add constraint 主键名 primary key (字段名1);
增加外键:
alter table 表名
add constraint 外键名 foreign key (字段名1) references 关联表 (字段名2);
select for update??
Archiver|手机版|科学网 ( 京ICP备07017567号-12 )
GMT+8, 2024-10-20 01:32
Powered by ScienceNet.cn
Copyright © 2007- 中国科学报社