Search code examples
mysqlmysql-workbenchworkbench

MySQL Workbench Import NULL from CSV


I can't for the life of me make MySQL Workbench import NULL for blank cells in a CSV.

I've tried:

  • blank
  • NULL
  • \N
  • Each with and without ""

How the does one signify a cell is 'null' inside a CSV file I want to import into MySQL via Workbench?


Solution

  • Since MySQL Workbench version 8.0.16 (released on 04/25/2019) there has been an additional option for uploading .csv file -- "null and NULL word as SQL keyword". When selecting this option as YES, the NULL expression without quotes in .csv file (,NULL, rather than ,"NULL",) will work for this purpose.