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 F. Four Divisors 求小于x的素数个数(待解决)
F. Four Divisors 题目连接: http://www.codeforces.com/contest/665/problem/F Description If an integer a i ...
- jQuery Mobile 页面事件
jQuery Mobile 页面事件 在 jQuery Mobile 中与页面打交道的事件被分为四类: Page Initialization - 在页面创建前,当页面创建时,以及在页面初始化之后 P ...
- Mysql报错 Cannot load from mysql.proc
Auth: Jin Date: 20140716 mysql --default-character-set utf8 -h127.0.0.1 -uroot -p < account-20140 ...
- http://www.tangible-engineering.com/tangible_t4editor.html
T4 Template Tutorials http://www.tangible-engineering.com/tangible_t4editor.html
- Buck converter uses low-side PWM IC
The most common switching-power topology is a buck converter, which efficiently transforms high volt ...
- GNU make 指南
http://docs.huihoo.com/gnu/linux/gmake.html GNU make 指南 翻译: 哈少 译者按: 本文是一篇介绍 GNU Make 的文章,读完后读者应该基本掌握 ...
- visual studio xcopy /exclude测试
http://files.cnblogs.com/files/zfanlong1314/exclude%E6%B5%8B%E8%AF%95.zipxcopy 提供了 /EXCLUDE: 参数用于在复制 ...
- 常见dotNet加密保护工具分析介绍(转)
本文主要介绍一些dotNet加密保护工具的原理以及就其脱壳进行简单探讨.remotesoft protector.maxtocode..Net Reactor.Cliprotector .themi ...
- Multiline ComboBox
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title> ...
- 【GISER && Painter】矢量切片(Vector tile)番外一:Proj4js
说明:番外篇是对正篇矢量切片(Vector tile)中提到的一些值得继续延伸的关注点继续进行探索和学习,所涉及的内容以解决实际问题为主要导向. 一.新的需求? 在完成了矢量切片的工作后,新的需求出现 ...