2011-07-20 20 views

Respuesta

25

Preserve the old data:

EXEC sp_rename 'MyTable.OldCol', 'RenamedOldCol', 'COLUMN'; 

Añadir computed column

ALTER TABLE MyTable ADD ComputedCol AS (some expression); 

Entonces, when you're happy

ALTER TABLE MyTable DROP COLUMN RenamedOldCol; 
Cuestiones relacionadas