I can\'t for the life of me make MySQL Workbench import NULL for blank cells in a CSV.
I\'ve tried:
If you were trying to import a CSV into the model for creating insert scripts (where you won't get the same options described in the other answers), try the following:
\func NULL
You can also use this syntax to call functions like the following to insert the current date time when you forward engineer the model to the database:
\func CURRENT_TIMESTAMP
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.
I suggest switching to Navicat for MySQL -- if only for the csv table import wizard. After repeated attempts to get the MySQLWorkbench Import Wizard to work for my CSV file, I gave up. I recalled using Navicat in an early project and it worked flawlessly. For this import, I was able to load my 15000+ row CSV with multiple null datetime values into my MySQL table without a problem.
Weird that MySQLWorkbench still hasn't solved this annoyance. But Navicat provides an easy alternative until they do.
You can solve your problem by updating your workbench to the newest.