zoukankan      html  css  js  c++  java
  • MYSQL创建分区时候报错

    第一种:ERROR 1064 (42000): Partitioning can not be used stand-alone in query near  不能单独创建分区。创建分区时要创建分区表

    解决:分区不能单独创建,在建表的时候就要创建一个分区表。

    第二种:ERROR 1564 (HY000): This partition function is not allowed 分区不支持此函数。

    解决:目前支持的分区函数有:https://blog.csdn.net/cleanfield/article/details/41011765

    第三种:ERROR 1067 (42000): Invalid default value for 'create_time' 时间默认值不正确

    解决:时间如果用datetime类型 不需要default 默认值。

    第四种:ERROR 1654 (HY000): Partition column values of incorrect type 分区列值不正确

    解决:因为我用的datetime 我的列值是create_time ,在partition p1 values less than ('这里的值要跟datetime的值吻合,意思是指不能是0 不能是201805这样的格式,一定要20180506这种格式')

    第五种:ERROR 1503 (HY000): A PRIMARY KEY must include all columns in the table's partitioning function 主键必须包含表的分区函数中的所有列

    解决:把主键id 和create_time拼起来做联合主键索引 

    以下是完整例子

    转载于:https://www.cnblogs.com/chenrunxuan/p/10515634.html

     
     
  • 相关阅读:
    vmware 安装提示the msi failed
    答辩修改记录
    科研系统修改记录
    python2.7学习记录之四
    sql语句--查询语句(MySQL)
    lei muban
    共模与差模的区别是什么?
    linux pinmux 引脚多路复用驱动分析与使用
    纯虚函数
    内核与驱动文件的version magic匹配问题
  • 原文地址:https://www.cnblogs.com/javalinux/p/15044354.html
Copyright © 2011-2022 走看看