Can I add a not null column without DEFAULT value

后端 未结 10 1528
Happy的楠姐
Happy的楠姐 2020-12-13 07:56

Can I add a column which is I specify as NOT NULL,I don\'t want to specify the DEFAULT value but MS-SQL 2005 says:

ALTER TABLE only allows columns to

10条回答
  •  半阙折子戏
    2020-12-13 08:51

    No.

    Just use empty string '' (in case of character type) or 0 (if numeric), etc as DEFAULT value

提交回复
热议问题