How do you add a computed column to a Table?

前端 未结 1 569
佛祖请我去吃肉
佛祖请我去吃肉 2021-02-11 12:03

How can I add a computed column to a table that already exists? S.O. has Computed Column Help - TSQL but no information about adding them.

1条回答
  •  北恋
    北恋 (楼主)
    2021-02-11 12:27

    The syntax I was looking for is:

    alter table TABLE_NAME
    add [column_name] as (**COLUMN-SQL**)
    

    0 讨论(0)
提交回复
热议问题