How to LOAD DATA INFILE in mysql with first col being Auto Increment?

后端 未结 7 2024
离开以前
离开以前 2020-11-30 02:05

Currently, We have a table similar to this:

---------------------
ID | AField | BField|
---------------------

The ID is Auto Increment

7条回答
  •  天命终不由人
    2020-11-30 03:11

    NULL in CSV file is read as a STRING in MySQL. If you want to have null values in a MySQL column instead use \N in place of `NULL. This will fix the issue and you will get the required result.

提交回复
热议问题