日期:2014-05-17 浏览次数:20558 次
if OBJECT_ID('tempdb..#temp', 'u') is not null drop table #temp;
CREATE TABLE #temp(eid INT, eidx INT, ename VARCHAR(100), elevel INT, eflag INT)
insert #temp
select '2','1','j','1','1' union all
select '5','1','2','1','1' union ALL
select '9','0','123','0','0' union all
select '19','34','123','0','0' union all
select '20','34','123','0','0' union all
select '21','34','123','0','0' union all
select '22','34','111','0','0' union all
select '23','34','111','0','0' union all
select '24','45','123','0','0' union all
select '25','46','132','0','0' union all
select '26','46','123','0','0' union all
select '27','47','123','0','0' union all