mysql into outfile NULL

回覆文章
yehlu
Site Admin
文章: 3245
註冊時間: 2004-04-15 17:20:21
來自: CodeCharge Support Engineer

mysql into outfile NULL

文章 yehlu »

https://www.reddit.com/r/mysql/comments ... t_null_as/

you can select ifnull(my_column, "") to turn it into "" at the select.
yehlu
Site Admin
文章: 3245
註冊時間: 2004-04-15 17:20:21
來自: CodeCharge Support Engineer

Re: mysql into outfile NULL

文章 yehlu »

代碼: 選擇全部

SELECT * INTO OUTFILE 'CUSTOMER.CSV' FIELDS TERMINATED BY ',' from SUNRISECT.CUSTOMER limit 0,10;

代碼: 選擇全部

sed -i 's/\\N/\ /g' CUSTOMER.CSV
回覆文章

回到「MySQL」