Reputation: 49
I am attempting to import a CVS file that contains blank values but when I import them, they are replaced with zeros. (i.e. a cust_referred_by field that is blank is replaced with 0 in MySQL). I would like them to show blanks in my SQL.
Upvotes: 0
Views: 207
Reputation: 24086
Make sure that your field is nullable.
If it's not, then run something like this to fix it:
ALTER TABLE my_table MODIFY cust_referred_by INT;
Also, depending on the way you do your import, you might be able to define how NULL values are provided.
Upvotes: 1