美文网首页mysql
Mysql中遇到的几种报错及其解决办法

Mysql中遇到的几种报错及其解决办法

作者: 对三zzzzzzz | 来源:发表于2020-02-20 17:25 被阅读0次

    1、报错
    [Err] 1064 - 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 ''xxx'' at line 1
    解决办法
    将所有的“ '' ”换成“ ·· ”(将所有的英文单引号换为Tab键上面的那个点号)

    2、报错
    [Err] 1100 - Table 'xxx' was not locked with LOCK TABLES
    解决办法
    加上 UNLOCK TABLES 这句代码

    3、报错
    [Err] 1063 - Incorrect column specifier for column 'xxx'
    解决办法
    INT型:max=255,不能超;  
    FLOAT型:必须要这样用:float(m,n),m为显示长度,n为小数位数。

    4、报错
    [Err] 1426 - Too big precision 10 specified for column 'T_START_TIME'. Maximum is 6.
    解决办法
    TIME类型的数据最大只能为6,将TIME后面括号里的数字改为6。(一般这个报错都是因为写的数字>6了)

    相关文章

      网友评论

        本文标题:Mysql中遇到的几种报错及其解决办法

        本文链接:https://www.haomeiwen.com/subject/rxaxqhtx.html