and和or
例子: 我想查询,username 为 张三,或者是李四的信息
select *from userInfo where username='张三' or username='李四' (大多数的朋友,应该是这样写的吧!)
但是,如果你的where 条件多了,很多的话,呵呵
select *ffrom userInfo where userid=1 and username='张三' or username='李四' and so on..(这样的话可能会有问题哦!) 最好这样写
select *ffrom userInfo where userid=1 and (username='张三' or username='李四' ) and so on..(这样写的话,就没有问题,并且很美观)