+ -
当前位置:首页 → 问答吧 → 书本上的入门实例报错

书本上的入门实例报错

时间:2011-12-22

来源:互联网

ISBN|TITLE|AUTHOR LAST|AUTHOR FIRST|COPYRIGHT DATE|
067993452X|Notes from Underground|Dostoevsky|Fyodor|August 1994|
123466789X|shui hu zhuan|nai an|shi|march 200|
456789522X|san guo yan yi|guan zhong|shi|may 120|

D:/books.txt


从mysql客户机运行LOAD DATA INFILE 语句

load data infile 'D:/books.txt' replace into table authors
fields terminated by '|' lines terminated by '\r\n'
text_fields(col1,col2,col3,col4,col5)
set author_last =col3,author_first=col4
ingore col1,col3,col5,1 lines;

意思我明白,可是结果报错,大概说让我查查手册中与text_fields函数相似的函数替换一下试试,也就是说这个函数不对。
谁能给我解释一下,我用的是Mysql 5.5 版本

作者: lbvv0311   发布时间: 2011-12-22

load data infile 'D:/books.txt' replace into table authors
fields terminated by '|' lines terminated by '\r\n'
(col1,col2,col3,col4,col5)
set author_last =col3,author_first=col4
ingore col1,col3,col5,1 lines;

作者: ACMAIN_CHM   发布时间: 2011-12-22