SQL SQL语句递归查询 sqlserver oracle 2018-12-14 KOGU 0 对于一些自表关联的表,想要查出一条记录和它的所有下属子级,可以用下面的语句:sqlserver: with my1 as(select * from aaa where id = 1 union all select aaa.* from my1, aaa where my1.id = aaa.pid ) select * from...