sql条件查询

今天给大家介绍的是sql的条件查询,下面直接结合例子说明:
一、 简单条件运算符
1、=(等于)

2、>(大于)

3、<(小于)

4、<>(不等于)

5、>=(大于等于)

6、<=(小于等于)

二、 逻辑运算符
1、 And(和、与)

2、 or(或者)

3、 not(不在、不是)

三、 模糊查询
1、 like(字段中包含的某个字或者符号)like后面加的是字符串

2、 in()根据字段值查询

3、 between… and…(在。。到。。之间)

4、 is null(为空)

5、 is not null(不为空)

以上就是sql的条件查询

原文链接:https://blog.csdn.net/weixin_49756100/article/details/124080138

Last modification:September 29, 2023
If you think my article is useful to you, please feel free to appreciate