February 20, 2004 at 1:43 am
Hi,
How do I modify a Normal column to a Computed Column? For example I have a table which already has a 3 columns a,b,c. Now I want to modify the c column to become a computed column with a simple expression c=a (the value of c column will always be the same as a's)
What DDL SQL stmt should I run?
Thanks for any help
Hendry
February 20, 2004 at 6:12 am
UPDATE table SET c = c + a
Good Hunting!
AJ Ahrens
webmaster@kritter.net
February 20, 2004 at 8:53 pm
AJ Ahrens, That Sql stmt doesnt' modify the schema of the table. It only updates the table just when you run that stmt. My Question is how to modify the schema of a table to allow an existing column to become a computed collumn.
In the BOL there's a procedure to add computed column. For example: ALTER TABLE MyTable ADD MyComputedCol As ....
However, I couldn't find a DDL stmt to modify a normal column to a computed one.
Any ideas?
Thanks
Hendry
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply