0%

mysql查询语句

数据表操作:

update修改
update 表名 set 列=值 where 条件
delete删除
delete from 表名 where 条件
条件支持
算术运算符:+ - * / %
关系运算符:=等于 !=不等于 <>不等于
逻辑运算符:and or not
模糊匹配运算符:in not in between and like (% _)
null判断:is null is not null

约束:

主键约束 primary key 非空不重复
唯一约束 unique key 非空
非空约束 not null 非空
检查约束
默认值约束 default 默认值
自增长约束 auto_increment 序号1开始,自增
外键约束