SELECT * FROM table1 RIGHT JOIN ( SELECT table3.NO1 no1 FROM TABLE3 RIGHT JOIN TABLE2 ON table2.NO=TABLE3.NO2
) TEMP ON temp.no1=table1.NO本回答被网友采纳
第2个回答 2017-12-12
//声明一个临时表 with temp(CUS_NO) as( //查询关联的cus_no select CUS_NO from colony2 and col_no in( // 查询所有的no select no from colony ) ) //数据关联自临时表 select * from customer2 where no in( select cus_no from temp )