SQL Server更改计算列 [英] SQL Server Alter Computed Column

查看:402
本文介绍了SQL Server更改计算列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有人知道一种更改计算列而不删除SQL Server中的列的方法。我想停止使用该列作为计算列,而开始直接在该列中存储数据,但想保留当前值。

Does anyone know of a way to alter a computed column without dropping the column in SQL Server. I want to stop using the column as a computed column and start storing data directly in the column, but would like to retain the current values.

这是否可能? / p>

Is this even possible?

推荐答案

我不知道,但是您可以执行以下操作

Not that I know of but here is something you can do

将另一列添加到表
中,使用计算列的值更新该列,然后删除计算列

add another column to the table update that column with the values of the computed column then drop the computed column

这篇关于SQL Server更改计算列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆