使用into outfile导出数据到文件中的问题
使用SQL:select * from `userlist` where 1=1 limit 0,$limitNub into outfile '/var/logjsh/jshtxt_$NowDate.csv' character set gbk fields terminated by '\t,' optionally enclosed by '\"' escaped by '\"' escaped by '\'' escaped by '\ ' lines terminated by '\t\r\n';
导出数据,如果数据库中的某列存储的数据时 NULL ,则导出后csv文件中显示为 N,如何避免这种问题
使用SQL:select * from `userlist` where 1=1 limit 0,$limitNub into outfile '/var/logjsh/jshtxt_$NowDate.csv' character set gbk fields terminated by '\t,' optionally enclosed by '\"' escaped by '\"' escaped by '\'' escaped by '\ ' lines terminated by '\t\r\n';
导出数据,如果数据库中的某列存储的数据时 NULL ,则导出后csv文件中显示为 N,如何避免这种问题
ifnull(f1,'')
or
ifnull(f1,0)
select col1,ifnull(col2,'N') into outfile '/home/xxx.txt' from tabname;
还有没有其他办法啊在线等急救啊