设计平台官网,seo上首页,网站注册网站违法吗,wordpress获取登录密码mysql如何对先有表进行分区#xff1f;有一张表#xff0c;已经创建了#xff0c;是一张普通的表#xff0c;先要对这张表进行hash分区#xff0c;我用一下语句创建提示错误#xff1a;mysql alter table 33- partition by hash(id)- partitions 2;ERROR 106…mysql如何对先有表进行分区有一张表已经创建了是一张普通的表先要对这张表进行hash分区我用一下语句创建提示错误mysql alter table 33- partition by hash(id)- partitions 2;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 33partition by hash(id)partitions 2 at line 1难道对普通标不能进行分区必须要在创建表的时候指定分区类型------解决方案--------------------你的表名是什么 如果是33则需要加上 33 反引号(注意不是单引号)SQL codemysql create table x ( - id int primary key, - c int - ) enginemyisam; Query OK, 0 rows affected (0.10 sec) mysql alter table x - PARTITION BY HASH(id) - PARTITIONS 2; Query OK, 0 rows affected (0.15 sec) Records: 0 Duplicates: 0 Warnings: 0 mysql------解决方案--------------------33为表名加引号。alter table tbpartition by hash(id)partitions 2;------解决方案--------------------33表名加alter table tbpartition by hash(id)partitions 2;欢迎大家阅读《mysql怎么对先有表进行分区》,跪求各位点评by 搞代码原创文章转载请注明 转载自搞代码微信 赏一包辣条吧~支付宝 赏一听可乐吧~