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
相关推荐
minebmw75 小时前
Oracle 19.29 中 ORA-00600 [4193] 错误完全解析与恢复指南m0_377618236 小时前
Golang怎么连接MySQL数据库_Golang MySQL连接教程【总结】weixin_586061466 小时前
C#怎么通过反射获取类属性_C#如何动态读取元数据【进阶】Pluto_CSND7 小时前
PostgreSQL 聚合函数总览资深数据库专家7 小时前
总账EBS 应用服务器1 的监控分析m0_678485457 小时前
CSS如何控制表格单元格边框合并_通过border-collapse实现m0_748839497 小时前
如何用组合继承模式实现父类方法复用与子类属性独立qq_334563557 小时前
PHP源码是否依赖特定芯片组_Intel与AMD平台差异【操作】qq_206901398 小时前
如何使用C#调用Oracle存储过程_OracleCommand配置CommandType.StoredProcedurem0_748839498 小时前
CSS如何实现元素平滑滚动_使用scroll-behavior属性设置