摘要:
有如下数据表假如我们要查询ID为003的数据的所有子节点我们可以使用CTE 递归查询完成...if OBJECT_ID('tb','N') is not null drop table tb;create table tb(id varchar(3) , pid varchar(3) , name ... 阅读全文
摘要:
declare @t table (C_ID int,PcName varchar(6),ParentID int)insert into @tselect 1,'安徽',0 union allselect 2,'安庆',1 union allselect 3,'安庆市',2 union allse... 阅读全文