DECLARE @T_SQL varchar(8000)
set @T_SQL=''
select @T_SQL=@T_SQL + name +'=ltrim(rtrim('+ name + ')),' from syscolumns where id=object_id('vipinfo') and name <> 'id'
set @T_SQL = 'update vipinfo set ' + left(@T_SQL,len(@T_SQL)-1)
exec (@T_SQL)
没有评论:
发表评论