请问怎样把ID与它的父ID串起来?我要得到的效果是:
a,b,c,e,g,j
a,b,c,e,g,k
a,c,e
表如下:create table test(ID varchar(10),fuID varchar(10))insert into test
select 'a','' union
select 'b','a' union
select 'c','a' union
select 'd','b' union
select 'e','c' union
select 'f','d' union
select 'g','e' union
select 'h','f' union
select 'i','f' union
select 'j','g' union
select 'k','g'
a,b,c,e,g,j
a,b,c,e,g,k
a,c,e
表如下:create table test(ID varchar(10),fuID varchar(10))insert into test
select 'a','' union
select 'b','a' union
select 'c','a' union
select 'd','b' union
select 'e','c' union
select 'f','d' union
select 'g','e' union
select 'h','f' union
select 'i','f' union
select 'j','g' union
select 'k','g'
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货