where条件查询的语法格式:
select * from 表名 where 条件
比较运算符查询:
查询编号大于8的学生: select * from students where id > 8;
查询编号小于等于4的学生: select * from students where id <= 4;
查询没被删除的学生: select * from students where delete=0逻辑运算符查询 :
查询年龄不在20岁到35岁之间的学生: select * from students where not (age >= 20 and age <= 35);
模糊查询 :
like是模糊查询关键字
%表示任意多个任意字符查询姓杨或张的学生: select * from students where name like '杨%' or name like '%靖张';
空判断查询:
判断为空使用: is null
判断非空使用: is not null
查询没有填写体重的学生: select * from students where weight is null;
MySQL where条件
代码真的养发2023-11-05 9:47
相关推荐
2501_901006472 分钟前
CSS如何实现多种颜色的线性渐变_使用linear-gradient()按方向和色标填色2303_821287382 分钟前
Golang怎么用embed嵌入SQL文件_Golang如何将SQL迁移文件嵌入Go程序统一管理【技巧】m0_702036533 分钟前
PHP怎么处理Eloquent Attribute Harmonization属性协调_Laravel解决数据冲突【教程】蜘蛛小助理3 分钟前
从 Excel 到多维表:蜘蛛表格如何解决传统数据库开发与维护痛点iAm_Ike6 分钟前
Redis怎样通过频道划分不同的日志级别kexnjdcncnxjs7 分钟前
CSS如何利用-nth-of-type(1)修改首个元素样式_通过位置约束精准修饰dinglu1030DL8 分钟前
Tailwind CSS如何实现鼠标悬停变色_使用hover-bg-blue-500类.txt瀚高PG实验室9 分钟前
xx000 can not wait without a pgproc神明9319 分钟前
Tailwind CSS如何实现鼠标悬停变色_使用hover-bg-blue-500类wjykp10 分钟前
1.neo4j琐碎知识