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
相关推荐
小猿姐3 小时前
实测对比:哪款开源 Kubernetes MySQL Operator 最值得用?(2026 深度评测)倔强的石头_6 小时前
从 “存得下” 到 “算得快”:工业物联网需要新一代时序数据平台TDengine (老段)6 小时前
TDengine IDMP 可视化 —— 分享GottdesKrieges7 小时前
OceanBase数据库备份配置SPC的存折8 小时前
MySQL 8组复制完全指南运维行者_8 小时前
OpManager MSP NetFlow Analyzer集成解决方案,应对多客户端网络流量监控挑战炸炸鱼.9 小时前
Python 操作 MySQL 数据库softshow10269 小时前
Etsy 把 1000 个 MySQL 分片迁进 VitessRonaldinho Gaúch9 小时前
MySQL基础不剪发的Tony老师10 小时前
Noir:一款键盘驱动的现代化数据库管理工具