1.查询学号为1,或者姓名为hualili的记录
select * from stu(表名) where 学号=1 or 姓名=“hualili”

2.查询学号为1,2,3的记录
select * from stu(表名) where 学号 in(1,2,3)

3.查询学号不是1,2,3的记录
select * from stu(表名) where 学号 not in(1,2,3)

4.查询年龄为null的记录
select * from stu(表名) where 年龄 is null

5.查询年龄在20到40之间的学生记录
select * from stu(表名) where 年龄>20 and 年龄<40

6.查询性别非男的学生记录
select * from stu(表名) where 性别<>“男”

7.查询姓名不为null的学生记录
select * from stu(表名) where 姓名 is null

9.19mysql的一些简单查询

相关文章:

  • 2022-12-23
  • 2021-12-25
  • 2021-07-06
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-09-20
  • 2022-12-23
  • 2021-06-03
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-26
相关资源
相似解决方案