Can I insert an empty string in a NOT NULL field?

后端 未结 3 2302
盖世英雄少女心
盖世英雄少女心 2021-02-19 16:03

Can I insert an empty string in a not null field?

insert into xyz(A,B) values(1,\'\');  // is this possible if B is NOT NULL?
3条回答
  •  生来不讨喜
    2021-02-19 16:45

    Depends on DBMS.

    Oracle no: '' and null are identical

    SQL-Server yes: '' and null are different values.

提交回复
热议问题