Insert default value when parameter is null

后端 未结 16 2390
遥遥无期
遥遥无期 2020-12-24 05:27

I have a table that has a column with a default value:

create table t (
    value varchar(50) default (\'something\')
)

I\'m using a stored

16条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-24 06:06

    Don't specify the column or value when inserting and the DEFAULT constaint's value will be substituted for the missing value.

    I don't know how this would work in a single column table. I mean: it would, but it wouldn't be very useful.

提交回复
热议问题