1

I m loading data in a mysql table with the instruction :

LOAD DATA LOCAL INFILE "/home/user123/Documents/PartageVB/export tables/pays.csv" INTO TABLE T_PAYS FIELDS TERMINATED BY ";" LINES TERMINATED BY "\n"(id, name, cit,actif);

In the file pays.csv, the column cit is boolean, and gets the value 1 or 0.

My problem is that once LOAD DATA is done, cit always gets the value 1 in the mysql table.

Does anyone know where I m wrong?

In the table, cit type is Bit(1).

Thanks

user1260928
  • 3,269
  • 9
  • 59
  • 105

1 Answers1

3

Please use "TINYINT(1)" instead of "Bit(1)".It might work. Refer this link

Community
  • 1
  • 1
adarsh hota
  • 327
  • 11
  • 23