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
相关推荐
王卫东4 小时前
深入HBase:原理剖析与优化实战呆呆小金人4 小时前
SQL键类型详解:超键到外键全解析Doro再努力4 小时前
Neo4j图数据库:简述增删改查dlhto5 小时前
Oracle Linux 9 的 MySQL 8.0 完整安装与远程连接配置送秋三十五6 小时前
5分钟读懂MySQL+Redis双写一致性实现流程bbmmqq6 小时前
根据角色ID获取完整角色信息(异步)阿波罗尼亚6 小时前
查询修正字段sql记录一个儒雅随和的男子6 小时前
Redis性能调优指南老华带你飞6 小时前
动漫资讯|基于Springboot的动漫交流网站设计与实现(源码+数据库+文档)JIngJaneIL6 小时前
机器人信息|基于Springboot的机器人门户展示系统设计与实现(源码+数据库+文档)