zoukankan      html  css  js  c++  java
  • 删除带中划线的数据库

    数据名带了个中划线,删库时报语法错误:

    mysql> drop database apigateway-ai;

    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 'apigateway-ai' at line 1

    加个单引号,再执行删除命令,仍然不行:

    mysql> drop database 'apigateway-ai';

    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 ''apigateway-ai'' at line 1

    解决:使用反撇号框选数据库名,可以完成命令执行:

    mysql> drop database `apigateway-ai`;

    Query OK, 77 rows affected (2.38 sec)

    结束。

  • 相关阅读:
    polya定理
    树状数组
    离散数学通路数的矩阵计算法
    高次同余方程求解
    Uva1378
    poj2888
    poj2409&&poj1286
    poj2182
    poj2154
    判断一个字符是否为汉字
  • 原文地址:https://www.cnblogs.com/liusingbon/p/13873285.html
Copyright © 2011-2022 走看看