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 ...
随机推荐
- Educational Codeforces Round 12 A. Buses Between Cities 水题
A. Buses Between Cities 题目连接: http://www.codeforces.com/contest/665/problem/A Description Buses run ...
- 一次经典的tcp三次握手
TCP报头 在三次握手中使用的字段: 32位序列号 seq:表示的是本次报文发送的数据的第一个字节的序号. 32位确认号:ack 表示期望下一次应该接受到的报文的第一个字节的序号,若ack = N则 ...
- mybatis源码分析(8)-----事务(mybatis管理、spring管理)
写在前面 接口:MyBatis的事务Transaction的接口有一下实现类 JdbcTransaction 由jdbc管理的事务(即利用Connection对象完成对事务的提交(commit()). ...
- How to let TVirtualStringTree to display an icon in disabled state?
How to let TVirtualStringTree to display an icon in disabled state? I need to display files in a dir ...
- SQL Server需要监控哪些计数器 ---指尖流淌
http://www.cnblogs.com/zhijianliutang/p/4174697.html
- Ps6 已具备图层搜索功能
层多了,找一个层非常考验我们的眼里,不过Photoshop cs6带来了福音,终于有搜索了:
- ASP.NET Core 1.0基础之应用启动
来源https://docs.asp.net/en/latest/fundamentals/startup.html ASP.NET 5 使得应用对每个http请求有完整的控制权.Startup类是程 ...
- iOS-- UIimageView详解
原文地址: http://blog.csdn.net/djxiaoyu_haha/article/details/40348377 // (1)创建 UIImageView *imageView = ...
- jquery点击回到页面顶部方法
1.代码实例 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UT ...
- AlphaGo:用机器学习技术古老的围棋游戏掌握AlphaGo: Mastering the ancient game of Go with Machine Learning
AlphaGo: Mastering the ancient game of Go with Machine Learning Posted by David Silver and Demis Has ...