2个回答
展开全部
如果c表是A,B两个字段的话
select a.A,b.B from a,b,c where a.A=c.A and b.B=c.B
如果c表只有一个C字段的话
select a.A,b.B from a,b,c c1,c c2 where a.A=c1.A and b.B=c2.B
或者
select a.A,b.B from a,b where exists (select * from c where a.A=c.C) and exists (select * from c where b.B=c.C)
或者
select * from (select a.A from a,c where a.A=c.C) aa ,(select b.B from b,c where b.B=c.C) bb
select a.A,b.B from a,b,c where a.A=c.A and b.B=c.B
如果c表只有一个C字段的话
select a.A,b.B from a,b,c c1,c c2 where a.A=c1.A and b.B=c2.B
或者
select a.A,b.B from a,b where exists (select * from c where a.A=c.C) and exists (select * from c where b.B=c.C)
或者
select * from (select a.A from a,c where a.A=c.C) aa ,(select b.B from b,c where b.B=c.C) bb
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询