issue with NOT NULL in mysql -
i using wamp
in win 7
.
in database, have 1 table be_users
, 2 fields: username
, email
, both of them set not null
.
but why still can insert
empty value , null value field: email, see below image:
actually, inserting text , not null
. text null
different null. can never violate rule if field set not null
.
try executing statement,
insert tablename values (null, null) -- fail
it surely fail because null
. statement below surely work because inserting string
.
insert tablename values ('', 'null') -- work
Comments
Post a Comment