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;
Drag and Drop objects from Object Explorer to the Query Window in SQL Server
SQL 'string_split()' function
How to solve “A cursor with the name already exists” problem?
Capitalize words in SQL (Display data first letter uppercase rest lowercase)
Drop all the tables, stored procedures, triggers, constraints and all the dependencies in one sql st...