MySQL NULL field asking for value while INSERT

107 Views Asked by At

Mysql Version: 5.7.x

Query:

INSERT INTO `products_manufacturer`
   SET    `website_id` = 27,
          `name` = 'YAZAKI CORP',
          `url` = 'http://www.speclocator.com/mfg_category.php?manufacturename=YAZAKI+CORP',
          `enabled` = true,
          `rectified_manufacturer_id` = NULL,
          `logo` = NULL;

Error Code: 1364. Field 'facebook' doesn't have a default value 0.000 sec

Table Structure attached as screenshot.DESC

1

There are 1 best solutions below

2
On

Try below query then after inserting data

ALTER TABLE products_manufacturer MODIFY COLUMN facebook VARCHAR(255) NULL DEFAULT '0.000';