I can't for the life of me make MySQL Workbench import NULL for blank cells in a CSV.
I've tried:
How the does one signify a cell is 'null' inside a CSV file I want to import into MySQL via Workbench?
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.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With