–修改字段为首字母大写
— exec sp_rename ‘shenbao_caigoufukuan.tid’, ‘tid’, @objtype = ‘column’;
select ‘exec sp_rename ”’ + table_name + ‘.’ + column_name + ”’, ”’ +
concat(upper(left(column_name,1)) , lower( right(column_name,len(column_name) – 1)))
+ ”’, @objtype = ”column”;’
from information_schema.columns
–where table_name=’xxx’;
执行查询语句得到 exec执行语句