mysql数据库创建删除带横杠的数据库名
mysql> create database d-d;
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 '-d' at line 1
1064报错:该错误一般出现在表名或者字段名设计过程中出现了mysql关键字导致的。问题确定是数据库名字的错误,我把横杠去掉以后就可以。
尝试:
create database [d-d];
create database 'd-d';
create database ”d-d“;
create database d\-d;
均报错:
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 '[d-d]' at line 1
解决:create database `d-d`; 加反引号
mysql> create database `d-d`;
Query OK, 1 row affected (0.00 sec)
mysql数据库创建删除带横杠的数据库名的更多相关文章
- su with hyphen and without - su带横杠和不带横杠
The difference between "-" and "no hyphen" is that the latter keeps your existin ...
- MongoDB 数据库创建删除、表创建删除、数据增删改查
一.管理 mongodb 数据库:mongo 查看所有数据库列 表 show dbs 二. 创建数据库 创建 数据库 use student 如果真的想把这个数据库创建成功,(collections) ...
- PostgreSQL数据库创建/删除
方法1 - 系统命令 sudo su - postgres #切换到postgres用户(系统用户) createdb weichen #创建数据库 psql #直接訪问数据库(默认进入本地postg ...
- MongoDB 数据库创建删除
在MongoDB数据库里面是存在有数据库的概念,但是没有模式(所有的信息都是按照文档保存的),保存数据的结构就是JSON结构,只不过在进行一些数据处理的时候才会使用到MongoDB自己的一些操作符号 ...
- MongoDB 数据库创建删除、表(集合) 创建删除、数据增删改查
使用数据库.创建数据库 use student 如果真的想把这个数据库创建成功,那么必须插入一个数据. 数据库中不能直接插入数据,只能往集合(collections)中插入数据.不需要专门创建集合,只 ...
- Linux 如何创建或删除以横杠(-)开头的文件或目录
小测试: [root@test test]# ls [root@test test]# touch -abc touch: invalid option -- 'b' Try `touch --hel ...
- 3.MySQL之创建/删除用户
登录mysql服务器后可使用grant命令来创建用户并赋予相关权限. mysql> use mysql; Reading table information for completion of ...
- Mysql 表 创建 / 删除(基础3)
创建表 语法: #进入数据库 mysql> use mydb123; Database changedmysql> select database();+------------+| d ...
- db2数据库创建删除主键约束和创建删除唯一键约束
创建.删除唯一约束: db2 "alter table tabname add unique(colname)" db2 "alter table tabname dro ...
随机推荐
- SCOJ 4429: frog's dice 最大流
4429: frog's dice 题目连接: http://acm.scu.edu.cn/soj/problem.action?id=4429 Description frog has many d ...
- HDU 4619 Warm up 2 最大独立集
Warm up 2 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=4619 Description Some 1×2 dominoes are pla ...
- Colorful Lecture Note
Colorful Lecture Note 时间限制:10000ms 单点时限:1000ms 内存限制:256MB 描述 Little Hi is writing an algorithm lectu ...
- 使用Spring配置shiro时,自定义Realm中属性无法使用注解注入解决办法
先来看问题 纠结了几个小时终于找到了问题所在,因为shiro的realm属于Filter,简单说就是初始化realm时,spring还未加载相关业务Bean,那么解决办法就是将springmvc ...
- react-native-communications 电话、短信、邮件、浏览器
第一种方法:Linking:调用系统的电话.短信.邮件.浏览器等功能 Linking.canOpenURL(this.props.url).then(supported => { if (!su ...
- MOSFET enhances voltage regulator's overcurrent protection
The classic LM317 adjustable-output linear voltage regulator offers a relatively high, if package-de ...
- 三款工作流引擎比较:WWF、netBPM 和 ccflow
下面将对目前比较主流的三款工作流进行介绍和比较,然后通过三款流程引擎分别设计一个较典型的流程来给大家分别演示这三款创建流程的过程.这三款工作流程引擎分别是 Windows Workflow Found ...
- 百度地图js小结
1.获取javascript API 服务方法,首先申请密钥(ak),才可成功载入APIJS文件. 用法例如以下: <script type="text/javascript" ...
- go语言基础之复数类型
1.复数类型 示例1: package main //必须有一个main包 import "fmt" func main() { var t complex128 //声明 t = ...
- J2EE 中 用 El表达式 和 Jsp 方式 取得 URL 中的参数方法
使用 el表达式方法: var urlParamValue = "${param.urlVarName}"; 使用 Jsp 表达式 var urlParamValue2 = &qu ...