SQLServer 修改数据库字段类型

时间:2020-04-14 12:35:26   收藏:0   阅读:186

 

 

# 修改字段名称为临时字段 exec sp_rename data_config.description, description1,COLUMN;

# 创建新的字段并设置为目标格式
alter table data_config add description text ;
# 把临时字段中的值保存到新字段
update data_config set description = description1;
# 删除临时字段
alter table data_config drop column description1;

 

原文:https://www.cnblogs.com/Leechg/p/12696938.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!