SQL 查询中动态使用列名(和循环) Codedeclare @i intset @i=1while @i<=5begin exec('Select getdate() As Time' + @i) set @i = @i + 1end