/******* 约束 *******/
primary key 主键
autoincrement 自增
not null 不允许为空
unique 唯一
default 默认值
constraint 字段名 foreign key (外键名称) references 表(字段名) 外键
/******* 创建表DDL *******/
create table if not exists 表名 (字段 字段类型,字段 字段类型)
/******* 删除表DDL *******/
drop table if exists 表名
/******* 插入数据DML *******/
insert into 表名 (字段名,字段名) values (内容,内容)
/******* 更新全部数据DML *******/
update 表名 set 字段名 = 内容,字段名 = 内容
/******* 条件更新数据DML ******/
update 表名 set 字段名 = 内容,字段名 = 内容 where 条件
/******* 删除全部数据DML *******/
delete from 表名
/******* 条件删除数据DML *******/
delete from 表名 where 条件
/******* 查询表全部数据DQL *******/
select * from 表名
/******* 部分字段查询DQL
primary key 主键
autoincrement 自增
not null 不允许为空
unique 唯一
default 默认值
constraint 字段名 foreign key (外键名称) references 表(字段名) 外键
/******* 创建表DDL *******/
create table if not exists 表名 (字段 字段类型,字段 字段类型)
/******* 删除表DDL *******/
drop table if exists 表名
/******* 插入数据DML *******/
insert into 表名 (字段名,字段名) values (内容,内容)
/******* 更新全部数据DML *******/
update 表名 set 字段名 = 内容,字段名 = 内容
/******* 条件更新数据DML ******/
update 表名 set 字段名 = 内容,字段名 = 内容 where 条件
/******* 删除全部数据DML *******/
delete from 表名
/******* 条件删除数据DML *******/
delete from 表名 where 条件
/******* 查询表全部数据DQL *******/
select * from 表名
/******* 部分字段查询DQL