select ... from 查找
distinct 合并相同的项
limit /limit ... offset 限制输出
order by 排序
order by ... desc 排序,降序
where/ where ... between ... and ... 条件判断输出
where ... and 多条件,同时符合
where ... or 多条件,符合其中一个
where ... in 在某一个范围中
like 通配筛选
regexp 利用正则表达式筛选
concat 字段拼接
concat ... as 字段拼接后重命名
函数:
count avg max min sum 使用函数对列进行操作
group by 分组
having 分组后筛选
where ... group by ... having 先筛选再分组再筛选
union 组合查询,多个select
union all 组合查询,不合并相同信息
Match Against 搜索,match字段,against内容
Insert into 插入
update ... set 更新内容
delete from 删除
create 创建
alter table ... add/drop 增加/删除表字段
drop 删除表/库
rename 重命名