mysql的基本数据类型

在这里插入图片描述
字符串类型
在这里插入图片描述
表的字段约束
unsigned 无符号
int(4) 显示宽度
not null 不能为空 在操作数据库时如果输入该字段的数据为NULL ,就会报错
default 设置默认值
primary key 主键 不能为空 且唯一
auto_increment 定义列为自增的属性,一般用于主键,数值会自动加1。
unique 唯一
MySQL的运算符:
算术运算符:+ - * / %
比较运算符:= > < >= <= <> !=
数据库特有的比较:in,not in, is null,is not null,like, between and
逻辑运算符:and or not
like: 支持特殊符号%和_ ; 其中 %表示任意数量的任意字符,_表示任意一位字符。

发布了19 篇原创文章 · 获赞 0 · 访问量 121

猜你喜欢

转载自blog.csdn.net/caiweijiancsdn/article/details/104735546
今日推荐