`

Linux 下MySQL数据导入

阅读更多
Linux 下MySQL数据导入:采用load命令实现数据导入

load data infile 'D:/JPSexContentMark/outputfile/url_log2010-05-04.log' into table mytest fields terminated by '\t'  enclosed by '"'
;

其中 filepath 需单引号
table 后接表名
fields terminated by '\t' 各字段通过制表符分开

enclosed by '"' 文本中的各个字段用双引号引起。

参数列在下面:
--fields-terminated-by= 字段分隔符
--fields-enclosed-by= 字段包括符
--fields-optionally-enclosed-by= 字段包括符,只用在CHAR和VERCHAR字段上
--fields-escaped-by= 转义字符
--lines-terminated-by= 行记录分隔符

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics