有一张表,已经创建了,是一张普通的表,先要对这张表进行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 '33
partition by hash(id)
partitions 2' at line 1难道对普通标不能进行分区,必须要在创建表的时候指定分区类型?
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 '33
partition by hash(id)
partitions 2' at line 1难道对普通标不能进行分区,必须要在创建表的时候指定分区类型?
解决方案 »
- 求mysql触发器
- mysql 无密码可以登入,怎么解决?
- 关于concat()连接字符问题
- 查询一个表中有的,但另一个相关联表中没有的记录及时间小于两周的数据的sql
- MySQL默认值问题...
- 返回空集合的SQL 语句怎么写啊?
- 不能创建数据库 “Access denied for user:'@locathost' to database 'project' ”
- >MYSQL,别处还有好的论坛去处吗?谢谢!!<
- 如果对utf编码直接进行查询?
- 大家好,程序写完,需要把数据库与程序从win移到lunix下使用,请问mysql的数据库如何移过去?
- 存储过程 不用临时表,也不用OUT参数,如何返回结果集
- 数据类型转换问题
mysql> create table x (
-> id int primary key,
-> c int
-> ) engine=myisam;
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: 0mysql>
show table '33';
alter table 33
-> partition by hash(id)
-> partitions 2;
alter table '33'
partition by hash(id)
partitions 2;