Modify table: How to change 'Allow Nulls' attribute from not null to allow null

后端 未结 8 853
星月不相逢
星月不相逢 2020-12-12 13:48

How to change one attribute in a table using T-SQL to allow nulls (not null --> null)? Alter table maybe?

8条回答
  •  眼角桃花
    2020-12-12 14:41

    For MySQL, MariaDB

    ALTER TABLE [table name] MODIFY COLUMN [column name] [data type] NULL
    

    Use MODIFY COLUMN instead of ALTER COLUMN.

提交回复
热议问题