mysql> show tables;
+--------------+
| Tables_in_ab |
+--------------+
| student      |
+--------------+
1 row in set (0.00 sec)mysql> rename table student to 学生成绩表;
ERROR 7 (HY000): Error on rename of '.\ab\student.frm' to '.\ab\瀛︾敓鎴愮哗琛?f
rm' (Errcode: 22)

解决方案 »

  1.   

    rename table student to `学生成绩表`;
      

  2.   

    字符集设置的问题。
    先set names 'gbk';
    rename table student to 学生成绩表;
      

  3.   

    1楼说什么符号。单引号吗? 成绩表的时候不用加单引号啊!!回复3楼:
    mysql> set names gbk;
    Query OK, 0 rows affected (0.01 sec)mysql> select*from student;
    +------+------+------+------+
    | 名字 | 语文 | 数学 | 英语 |
    +------+------+------+------+
    | 张三 |   58 |   47 |   86 |
    +------+------+------+------+
    1 row in set (0.00 sec)mysql> rename table student to 学生成绩表;
    ERROR 7 (HY000): Error on rename of '.\ab\student.frm' to '.\ab\瀛︾敓鎴愮哗琛?f
    rm' (Errcode: 22)
    mysql>
      

  4.   

    set names gb2312;
    set names latin1;
    都试试..
      

  5.   

    rename table student to `学生成绩表`;
      

  6.   

    mysql> rename table student to `学生成绩表`;
    ERROR 7 (HY000): Error on rename of '.\ab\student.frm' to '.\ab\瀛︾敓鎴愮哗琛?f
    rm' (Errcode: 22)
      

  7.   

    调用这个之前,set names 'gbk'
    然后再。