select * from table5 where table5.id in (select * from table4 where table4.id in (select * from table3 where table3.id in (select * from table2 where table2.id in (select * from table1 where table1.id ))))
上面多了一点 select * from table5 where id in (select * from table4 where id in (select * from table3 where id in (select * from table2 where id in (select id from table1 ))))
in (select * from table4 where table4.id
in (select * from table3 where table3.id
in (select * from table2 where table2.id
in (select * from table1 where table1.id ))))
设计报表吗
select * from table5 where id
in (select * from table4 where id
in (select * from table3 where id
in (select * from table2 where id
in (select id from table1 ))))