56,687
社区成员
发帖
与我相关
我的任务
分享
select *
from post a ,cat b , cat c
where a.id=b.postid and a.id=c.postid and b.name='A' and c.name='B'
select postid
from post_cat a1,post_cat a2,cat c1,cat c2
where a1.catid=c1.catid and a2.catid=c2.catid
and a1.postid=a2.postid
and c1.catname='A' and c2.catname='B'