从文件导入到mysql时,分隔符不太好选,如果选可见字符的话,数据中难免会有重复的,所以选了不可见字符做分隔符
分隔符为 '\02\03' 换行符为'\02\n\n',
想着是这么写:
FIELDS TERMINATED BY '\02\03' LINES TERMINATED BY '\02\n\n'
失败。。。
google了一圈找到正确方式:
FIELDS TERMINATED BY X'0203' LINES TERMINATED BY X'020A0A'
原来在mysql命令行里,可以用X'0203'来表示16进制的字符
以下三种方式都可以:
select 0x4D7953514C;
select x'4D7953514C';
select X'4D7953514C';