SQL for,while循环语句
2014-09-29来源:易贤网

select manages from tables

declare @i int

set @i=1

while @i < (select count(*) from tables)

begin

update tablesset manages =(select manages from tableswhere companyid=@i)+','

break

set @i=@i+1

end

更多信息请查看IT技术专栏

推荐信息