There is NO way to alter computed column. You have to drop and recreate it.
Let’s say you have a table with 3 column. And the 3rd one is the sum of the other two:
CREATE TABLE MyTable (Column1 int, Column2 int, Column3 AS Column1 + Column2);
If you want to change that computed column as multiply of the other two. Then:
-- First, You must Drop The Computed Column ALTER TABLE MyTable DROP COLUMN Column3; -- And Then You can Create The New Computed Column ALTER TABLE MyTable ADD Column3 AS Column1 * Column2;
List all Foreign Keys referencing a given table in SQL Server
Search text in all tables in SQL Server
Change Default Value for "Select Top n" and "Edit Top n" Rows in SQL Server Studio
How to solve “A cursor with the name already exists” problem?
Create, Alter, Drop and Execute SQL Server Stored Procedures