主题:[原创]求助:关于mysql数据导入
我往数据库里导数据时出现的问题:
C:\Administrator>mysql db -h localhost -u root -p <c:\insert_zip.sql
Enter password: ******
ERROR 1064 (42000) at line 334: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '台东县','长滨');insert into ZIP values (NULL, 963,'台东县','太麻里');
insert in' at line 1
不知道是不是中文乱码的关系?安装mysql选的内码是utf8。mysql版本是: 5.0.45-community-nt-log 系统是:XP professional 版本 2002 Service Pack 2。
建表文件是:
drop table if exists zip;
create table zip (
id smallint unsigned not null auto_increment primary key,
zip int unsigned,
zone char(20),
area char(20)
);
insert_zip.sql文件如下:delete from ZIP;
insert into ZIP values (NULL, 100,'台北县','中正区');
...............................................
insert into ZIP values (NULL, 962,'台东县','长滨');
insert into ZIP values (NULL, 963,'台东县','太麻里');
...........................................
请高手们指点一下,再次先谢谢了!!!
C:\Administrator>mysql db -h localhost -u root -p <c:\insert_zip.sql
Enter password: ******
ERROR 1064 (42000) at line 334: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '台东县','长滨');insert into ZIP values (NULL, 963,'台东县','太麻里');
insert in' at line 1
不知道是不是中文乱码的关系?安装mysql选的内码是utf8。mysql版本是: 5.0.45-community-nt-log 系统是:XP professional 版本 2002 Service Pack 2。
建表文件是:
drop table if exists zip;
create table zip (
id smallint unsigned not null auto_increment primary key,
zip int unsigned,
zone char(20),
area char(20)
);
insert_zip.sql文件如下:delete from ZIP;
insert into ZIP values (NULL, 100,'台北县','中正区');
...............................................
insert into ZIP values (NULL, 962,'台东县','长滨');
insert into ZIP values (NULL, 963,'台东县','太麻里');
...........................................
请高手们指点一下,再次先谢谢了!!!