
1个回答
展开全部
select * into 临时表_1级目录 from 表A where fatherid=0
select * into 临时表_2级目录 from 表A a inner join 临时表_1级目录 b on a.fatherid=b.id
select * into 临时表_3级目录 from 表A a inner join 临时表_2级目录 b on a.fatherid=b.id
select * from
(select id as first_id,name as first_name from 临时表_1级目录) a,
(select id as second_id,name as second_name from 临时表_2级目录) b,
(select id as third_id,name as third_name from 临时表_3级目录) c
select * into 临时表_2级目录 from 表A a inner join 临时表_1级目录 b on a.fatherid=b.id
select * into 临时表_3级目录 from 表A a inner join 临时表_2级目录 b on a.fatherid=b.id
select * from
(select id as first_id,name as first_name from 临时表_1级目录) a,
(select id as second_id,name as second_name from 临时表_2级目录) b,
(select id as third_id,name as third_name from 临时表_3级目录) c
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询