title: How to insert image into mysql workbench using sql query? I have tried with LOAD_FILE but it ends up with error with null value
body: <p>I created a table named as product and the product picture is defined as LONGBLOB datatype.</p>
  <pre><code>CREATE TABLE `product`.`product` (
    `product_id` INT NOT NULL,
    `product_name` VARCHAR(45) NOT NULL,
    `product_category` VARCHAR(45) NOT NULL,
    `product_date` DATETIME NOT NULL,
    `product_description` LONGTEXT NOT NULL,
    `product_pic` LONGBLOB NOT NULL,
    `price` DOUBLE NOT NULL,
    PRIMARY KEY (`product_id`));
  </code></pre>
  <pre><code>INSERT INTO `product`.`product` (`product_id`, `product_name`, `price`, `product_category`, `product_date`, `product_description`, `product_pic`) VALUES ('01', 'Ram Hoodies', '59.00', 'Clothes', '2020-12-27', 'Ram Hoodies which just brought two monthss ago', LOAD_FILE('C:/Users/Khor Jia Cheng/Desktop/202009/Java EE/Project/images/jacket-ram.jpeg'));
  INSERT INTO `product`.`product` (`product_id`, `product_name`, `price`, `product_category`, `product_date`, `product_description`, `product_pic`) VALUES ('02', 'Cooker', '159.00', 'Household Appliances', '2020-12-27', 'A multicooker which is still new but I don\'t use it frequently', LOAD_FILE('C:/Users/Khor Jia Cheng/Desktop/202009/Java EE/Project/images/cooker.jpeg'));
  INSERT INTO `product`.`product` (`product_id`, `product_name`, `price`, `product_category`, `product_date`, `product_description`, `product_pic`) VALUES ('03', 'Guitar', '159.00', 'Others', '2020-12-27', 'Guitar consists of a hollow wooden body with six strings stretched over it and along a narrow neck.', LOAD_FILE('C:/Users/Khor Jia Cheng/Desktop/202009/Java EE/Project/images/guitar1.jpeg'));
  INSERT INTO `product`.`product` (`product_id`, `product_name`, `price`, `product_category`, `product_date`, `product_description`, `product_pic`) VALUES ('04', 'Dumpling', '19.00', 'Food&amp;Beverages', '2020-12-28', 'Dumpling consists of prawn', LOAD_FILE('C:/Users/Khor Jia Cheng/Desktop/202009/Java EE/Project/images/dumpling.jpeg'));
  INSERT INTO `product`.`product` (`product_id`, `product_name`, `price`, `product_category`, `product_date`, `product_description`, `product_pic`) VALUES ('05', 'Headset', '209.00', 'Others', '2020-12-28', 'Headset', LOAD_FILE('C:/Users/Khor Jia Cheng/Desktop/202009/Java EE/Project/images/headset.jpeg'));
  INSERT INTO `product`.`product` (`product_id`, `product_name`, `price`, `product_category`, `product_date`, `product_description`, `product_pic`) VALUES ('06', 'Badminton Racquet', '259.00', 'Others', '2020-12-28', 'Yonex Badminton Racquet', LOAD_FILE('C:/Users/Khor Jia Cheng/Desktop/202009/Java EE/Project/images/badminton1.jpeg'));
  INSERT INTO `product`.`product` (`product_id`, `product_name`, `price`, `product_category`, `product_date`, `product_description`, `product_pic`) VALUES ('07', 'Introduction to Software Engineering', '159.00', 'Books&amp;Stationery', '2020-12-29', 'A book which can used by Software Engineering from first year to last year', LOAD_FILE('C:/Users/Khor Jia Cheng/Desktop/202009/Java EE/Project/images/book1.jpeg'));
  </code></pre>
  <p>But when I insert the value with LOAD_FILE it pops out the column cannot be null..Why?
  <a href="https://i.stack.imgur.com/IvyF1.png" rel="nofollow noreferrer">NULL ERROR</a></p>