select *from Bleft join A on A.uid = B.uidwhere B.sid = "1"其中*号最好不要用,自己把表里的字段一一列举
select b.* from a,bwhere a.uid=b.uid and a.sid=1
where xx.uid='xx'and xx.sid='xx';