Hi all;
Here is my table;
delimiter ;
CREATE TABLE `t1` (
`idt1` int(11) NOT NULL auto_increment,
`f1` varchar(45) default NULL,
`f2` varchar(45) NOT NULL,
PRIMARY KEY (`idt1`),
UNIQUE KEY `idt1_UNIQUE` (`idt1`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin5;
f2 column properties is "not null" and didnt have default value.
Mysql workcbench Sql development :
Test 1:
INSERT INTO t1 (f1) VALUES ('a');
Mysql give error Error Code: 1364
Field 'f2' doesn't have a default value
-------------------------------------------
Test 2:
INSERT INTO t1 (f1,f2) VALUES ('a','');
Mysql can insert null (blank) value to f2 column.
Is this is a bug ? Thanks.
Host : Windows 7 Ultimate (Developer machine)
Mysql : 5.0.89-community-nt
Here is my table;
delimiter ;
CREATE TABLE `t1` (
`idt1` int(11) NOT NULL auto_increment,
`f1` varchar(45) default NULL,
`f2` varchar(45) NOT NULL,
PRIMARY KEY (`idt1`),
UNIQUE KEY `idt1_UNIQUE` (`idt1`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin5;
f2 column properties is "not null" and didnt have default value.
Mysql workcbench Sql development :
Test 1:
INSERT INTO t1 (f1) VALUES ('a');
Mysql give error Error Code: 1364
Field 'f2' doesn't have a default value
-------------------------------------------
Test 2:
INSERT INTO t1 (f1,f2) VALUES ('a','');
Mysql can insert null (blank) value to f2 column.
Is this is a bug ? Thanks.
Host : Windows 7 Ultimate (Developer machine)
Mysql : 5.0.89-community-nt