How can I alter this computed column in SQL Server 2008?

后端 未结 4 1131
傲寒
傲寒 2020-12-07 00:23

I have a computed column created with the following line:

alter table tbPedidos 
add restricoes as (cast(case when restricaoLicenca = 1 or restricaoLote = 1          


        
4条回答
  •  离开以前
    2020-12-07 00:57

    Something like this:

    ALTER TABLE dbo.MyTable
    DROP COLUMN OldComputedColumn
    
    ALTER TABLE dbo.MyTable
    ADD OldComputedColumn AS OtherColumn + 10
    

    Source

提交回复
热议问题