LOAD DATA [LOW_PRIORITY | CONCURRENT] [L

LOAD DATA [LOW_PRIORITY | CONCURRENT] [LOCAL] INFILE ‘file_name.txt’
[REPLACE | IGNORE]
INTO TABLE tbl_name
[FIELDS
[TERMINATED BY ‘\t’] – 在字段之间写入制表符
[[OPTIONALLY] ENCLOSED BY ‘’] --不把字段包含在任何引号字符中。如果是ENCLOSED BY “’” :使用单引号把各个字段括起来;
[ESCAPED BY ‘\’ ] --当字段值中出现制表符、新行或‘\’时,使用‘\’进行转义。
]
[LINES
[STARTING BY ‘\n’] – 在行的末端写入新行。
[TERMINATED BY ‘’] --不会跳过任何行前缀。
]
[IGNORE number LINES]
[(col_name_or_user_var,…)]
[SET col_name = expr,…)]

SELECT * INTO outfile ‘e:/tmp/t_aty_corp.sql’ FIELDS TERMINATED BY ‘$’ OPTIONALLY ENCLOSED BY “’” ESCAPED BY ‘\’ LINES STARTING BY ‘\r\n’ TERMINATED BY ‘’ FROM db_aty.t_aty_corp;

‘1100’ ′ 监 狱 管 理 局 ′ '监狱管理局' \N 1 1 1\N$‘监狱管理局’$1 1 1 1’1100’ ′ 1 ′ '1' 1\N ′ 2011 − 01 − 1200 : 00 : 0 0 ′ '2011-01-12 00:00:00' 2011011200:00:00
‘1101’ ′ 第 一 监 狱 ′ '第一监狱' ‘1100’ 2 2 2\N$‘第一监狱’$1 2 2 2’1101’ ′ 1 ′ '1' 1\N ′ 2011 − 01 − 1200 : 00 : 0 0 ′ '2011-01-12 00:00:00' 2011011200:00:00
‘1102’ ′ 第 二 监 狱 ′ '第二监狱' ‘1100’ 2 2 2\N$‘第二监狱’$1 3 3 3’1102’ ′ 1 ′ '1' 1\N ′ 2011 − 01 − 1200 : 00 : 0 0 ′ '2011-01-12 00:00:00' 2011011200:00:00

SELECT * INTO outfile ‘e:/tmp/t_aty_corp.sql’ FIELDS TERMINATED BY ‘$’ OPTIONALLY ENCLOSED BY “^” ESCAPED BY ‘\’ LINES STARTING BY ‘\r\n’ TERMINATED BY ‘’ FROM db_aty.t_aty_corp;

1100KaTeX parse error: Expected group after '^' at position 7: ^监狱管理局^̲\N 1 1 1\N$监狱管理局$1 1 1 11100KaTeX parse error: Double superscript at position 3: ^1^̲\NKaTeX parse error: Expected group after '^' at position 21: …-01-12 00:00:00^̲
1101KaTeX parse error: Expected group after '^' at position 6: ^第一监狱^̲1100 2 2 2\N$第一监狱$1 2 2 21101KaTeX parse error: Double superscript at position 3: ^1^̲\NKaTeX parse error: Expected group after '^' at position 21: …-01-12 00:00:00^̲
1102KaTeX parse error: Expected group after '^' at position 6: ^第二监狱^̲1100 2 2 2\N$第二监狱$1 3 3 31102KaTeX parse error: Double superscript at position 3: ^1^̲\NKaTeX parse error: Expected group after '^' at position 21: …-01-12 00:00:00^̲

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值