MYSQL创建分区时报错Partitioning can not be used stand-alone in query near 'partition by hash(id) partition
Partitioning can not be used stand-alone in query near 'PARTITION BY RANGE COLUMNS(stats_dt)
其实是简单的错误,建立mysql分区时,语句,写错了,在在之前,多了一个分号,报错。
分号,应该在建表最后才对。
分区不能单独创建,在建表的时候就要创建一个分区表。
需要分区的字段必须是在 primary key 或者 unique 中,不然会报错。