error: import csv which column has blank value and database table's column type is int

K13483's profile image K13483 posted 2 years ago in Import/Export Permalink

I have problem: when I import csv to table,my csv'column has blank,and my table's type set int(or float), it happens error, how to solve the problem...? Description

3 attachment(s):
  • 1
  • 2
  • 3
ansgar's profile image ansgar posted 2 years ago Permalink

The error is only happening when MySQL runs with STRICT_TRANS_TABLES mode.

You can "unset" the mode for the current session, then the INSERTs should run fine:

SET @@sql_mode:='';
-- CSV import...
K13483's profile image K13483 posted 2 years ago Permalink

thanks a lot~it solved

Please login to leave a reply, or register at first.