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

1 Answer 1

3

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.