SQL查询有多个where条件

如题所述

sql中可以有多个where 条件。可以反复的嵌套。
例如:
select * from 表1
where 字段1 in (select 字段2 from 表2 where 查询条件)
and 字段3 in (select 字段4 from 表3 where 查询条件 )
温馨提示:答案为网友推荐,仅供参考
第1个回答  2017-08-15
select * from students where name='张三' and sex='男' and age>20 这样写 ,用and 或 or 连接条件
第2个回答  2017-08-15
每个条件 用 and 连接 就好了