SQL语句中WHRER后面能加多个AND吗?

来源:百度知道 编辑:UC知道 时间:2024/05/19 23:01:15
RT

你想加多少就加多少。

给你个语句你看看,相信你会很有收获的:

select 村号 from T_市 inner join T_乡 on T_市.市号=T_乡.市号 inner join T_村 on T_乡.乡号=T_村.乡号 where 市名='"+city+"' AND 乡名='乡名'AND 村名='村名'

and 想加多少加多少!

select * from users where id=1 and name='zhangsan',age=10明白了吗?用逗号分隔开

能加,但是要记得 where条件里不能出现sum()或者count()这样的东西