select * into #t1 from Userinfo
declare @id varchar(2000);
while (exists(select ProjectID from #t1))
begin
select @id=userid from #t1
delete #t1 where ProjectID=@id
end
drop table #t1
转载于:https://www.cnblogs.com/Children-qiuzhen/p/10142490.html
select * into #t1 from Userinfo
declare @id varchar(2000);
while (exists(select ProjectID from #t1))
begin
select @id=userid from #t1
delete #t1 where ProjectID=@id
end
drop table #t1
转载于:https://www.cnblogs.com/Children-qiuzhen/p/10142490.html