select * from a, b where 
a.id=b.id and a.bh='0' and b.rq='2'很简单啊,不知道你究竟想干吗