我创建了一个paper表,里面有个pno字段,我不小心设置为了int数据类型。我想要修改为char数据类型为什么一直提示我有错误?(可以告诉我出错的语法原因是什么吗?以及如何修改呢?
mysql> create table paper(
-> pno int(6) primary key,
-> pna nvarchar(10) not null,
-> ppr float(2) not null
-> );
mysql> insert into paper(pno,pna,ppr) values('000001','人民日报','12.5');
mysql> select * from paper;
+-----+----------+------+
| pno | pna | ppr |
+-----+----------+------+
| 1 | 人民日报 | 12.5 |
+-----+----------+------+
mysql> alter table paper alter column pno char(6);
ERROR 1064 (42000): 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 'char(6)' at line 1