Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
使用默认值将 null 插入非 null 列会给我一个验证错误,而不是采用默认值。我不想在触发所有表之前进行。有没有其他方法可以做到这一点?
火鸟 2.1.3
当您在插入中省略字段时使用默认值,而不是当您包含具有空值的字段时。
示例: 使用默认值Name:
Name
insert into SomeTable (Id) values (42)
尝试null插入Name:
null
insert into SomeTable (Id, Name) values (42, null)