Skip to content

Instantly share code, notes, and snippets.

@laoshuterry
Last active October 25, 2016 13:42
Show Gist options
  • Save laoshuterry/76d88477e2af7137ff2996cc3ffcf73f to your computer and use it in GitHub Desktop.
Save laoshuterry/76d88477e2af7137ff2996cc3ffcf73f to your computer and use it in GitHub Desktop.
MySQL导入命令实例
--必须使用绝对路径,否则当前路径是数据实例文件路径
load data infile '/mdb/mysql/ExpData.csv'
--必须加上库名
into table OAM.OCS_PROD_CELL_MSISDN
--正常的分隔符
fields terminated by '|'
--Linux环境上不用使用'\n', windows环境上要使用'\r'
lines terminated by '\n'
--以此表字段进行导入
(MSISDN_ID,MSISDN_FIRST,MSISDN_LAST,AREA_CODE,OPERATOR_CODE,EFF_DATE,EXP_DATE,BATCH_NO);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment