zoukankan      html  css  js  c++  java
  • mysql 倒引号

    1、在mysql中,保留字不能作为表名,字段名等用处,如下:
    mysql> alter table student add column desc varchar(16) after name;
    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 'desc varchar(16) after name' at line 1
    2、怎么解决这个问题?
    a、使用其他的单词
    b、使用倒引号,告诉mysql不要把它当做保留字解析。如下:
    mysql> alter table student add column `desc` varchar(16) after name;
    Query OK, 1 row affected
    3、假如表名或者字段名存在保留字,导出来的sql脚本就会存在问题,导入就会出错。怎么解决这个问题?
    mysql导出来的sql脚本,对于表名和字段名,统一都加上了倒引号。

  • 相关阅读:
    Font Awesome 中文网
    mobileselect学习
    JavaScript模块化
    webpack基本使用
    MVVM架构方式
    http-server开启测试服务器
    json-server模拟服务器API
    vue-router
    git的使用
    Vue生命周期
  • 原文地址:https://www.cnblogs.com/nzbbody/p/4470522.html
Copyright © 2011-2022 走看看