mysqldump将null存储为空白 [英] mysqldump store null as blank

查看:260
本文介绍了mysqldump将null存储为空白的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用mysqldump创建我的数据表的转储.唯一的问题是,mysql将空值存储为/N ,如果我要将创建的CSV文件导入到HANA中,/N则不称为空值,而是varchar.

I use mysqldump to create a dump of my data table. The only problem is, that mysql stores a null value as /N and if I want to import the created CSV file into HANA, /N is not known as null but as varchar.

是否有一种方法可以在转储期间跳过空值,或者我可以将/N替换为空白?

Is there a way to skip the null values during dumping or can I just replace /N with a blank?

推荐答案

据我所知,没有用于处理NULL输出的选项. 您可以尝试在表中将NULL替换为空:

As far as I know,there are no options for handling the output of NULLs. You could try to replace NULLs with empty in your table:

UPDATE `tablename` SET columnname= '' where columnname is null

这篇关于mysqldump将null存储为空白的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆