通过a表查b表,再查c表。
比如,a表引用b表的主键,b表引用c表的主键
select c.cid from a,b,c where a.bid = b.bid and b.cid = c.cid
select X1.id, X3.nnnid from X1 join X2 on X1.nid=X2.nid join X3 on X2.nnid=X3.nnid
三表互联,只要找到连接点就行。
x1.nid = x2.nid
x2.nnid = x3.nnid
select * from a,b,c where a.id=b.id and b.id=c.id