rke_poke
rke_poke
2017-11-12 02:43

mysql复制粘贴中产生的问题

  • sql

请问为什么我直接复制粘贴sql语句运行时,cmd串口提示以下错误,怎么改?
#创建商品表
create table product(
pid int primary key auto_increment,
pname varchar(20),
price double,
pdate timestamp
)
#自动增长列:auto_increment,要求:1,必须整型(int) 2.必须是主键
insert into product values (null,'谭妮平',0.01,null);
insert into product values (null,'李士雪',38,null);
insert into product values (null,'左慈',-998,null);
insert into product values (null,'黄迎',99999,null);
insert into product values (null,'南国强',99998,null);
insert into product values (null,'士兵',1,null);
insert into product values (null,'李士兵',698,null);

cmd窗口提示的信息:
mysql> create table product(
-> pid int primary key auto_increment,
-> pname varchar(20),
-> price double,
-> pdate timestamp
-> );
Query OK, 0 rows affected (0.01 sec)

mysql> insert into product values (null,'谭妮平',0.01,null);
ERROR 1366 (HY000): Incorrect string value: '\xC4\xDD\xC6\xBD' for column 'pname
' at row 1
mysql> insert into product values (null,'李士雪',38,null);
ERROR 1366 (HY000): Incorrect string value: '\xC0\xEE\xCA\xBF\xD1\xA9' for colum
n 'pname' at row 1
mysql> insert into product values (null,'左慈',-998,null);
ERROR 1366 (HY000): Incorrect string value: '\xD7\xF3\xB4\xC8' for column 'pname
' at row 1
mysql> insert into product values (null,'黄迎',99999,null);
ERROR 1366 (HY000): Incorrect string value: '\xBB\xC6\xD3\xAD' for column 'pname
' at row 1
mysql> insert into product values (null,'南国强',99998,null);
ERROR 1366 (HY000): Incorrect string value: '\xC4\xCF\xB9\xFA\xC7\xBF' for colum
n 'pname' at row 1
mysql> insert into product values (null,'士兵',1,null);
ERROR 1366 (HY000): Incorrect string value: '\xB1\xF8' for column 'pname' at row
1
mysql> insert into product values (null,'李士兵',698,null);
ERROR 1366 (HY000): Incorrect string value: '\xC0\xEE\xCA\xBF\xB1\xF8' for colum
n 'pname' at row 1
请问怎么回事?怎么解决?

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

3条回答

为你推荐

换一换