标签:
declare @n int declare @rowcount int declare @name varchar(50) create table #temp ( id int identity(1,1), employeeName nvarchar(100) ) insert into #temp select name from employee set @rowcount=@@rowcount set @n=1 while @n<@rowcount begin select @name=employeename from #temp where id=@n print(@name) set @n=@n+1 end drop table #temp
标签:
原文地址:http://www.cnblogs.com/liucyi/p/5097753.html