sql数据导出导入格式化

SHELL脚本导入导出数据时,按逗号分隔,引号包含字段,null值''

gccli -uroot -h$ip -e"rmt:${sqlStr} into outfile '${name}${datetimes}.txt' fields terminated by ',' enclosed by '\"' null_value '';"

FIELDS TERMINATED BY ',' 字段间分割符
OPTIONALLY ENCLOSED BY '"' 将字段包围 对数值型无效
LINES TERMINATED BY '\n' 换行符

上一篇:HDU 1856


下一篇:使用Regsvr32.exe程序注册/注销ActiveX控件