我有一个使用以下行创建的计算列:
alter table tbPedidos
add restricoes as (cast(case when restricaoLicenca = 1 or restricaoLote = 1 then 1 else 0 end as bit))
Run Code Online (Sandbox Code Playgroud)
但是,现在我需要更改此列,例如:
alter table tbPedidos
alter column restricoes as (cast(case when restricaoLicenca = 1 or restricaoLote = 1 or restricaoValor = 1 then 1 else 0 end as bit))
Run Code Online (Sandbox Code Playgroud)
但它不起作用.我正在尝试为case语句输入另一个条件,但它不起作用.
非常感谢!