关于mysql的错误 - no query specified

学习了:http://blog.csdn.net/tenfyguo/article/details/7566941

sql语句可以用分号或者\G来结尾;出现这个错误一般是分号多写了;

学习了:http://blog.csdn.net/guoqianqian5812/article/details/51754594

分号也可以换成 \g

在Navicat中是不支持\G和\g标记的;

学习了:https://stackoverflow.com/questions/2277014/why-the-g-in-select-from-table-name-g  这个说的最明白了,膜拜一下org!

\G表示 go的意思;

In summary...
--vertical >> -E >> ego >> \G ...Tada !

学习了:https://www.2cto.com/database/201212/178075.html 老外说的还针对,

使用-E的话,的确以列方式显示;但是-E登录之后没有办法按行显示了;

-E登录的方法,在开始菜单里面:C:\ProgramData\Microsoft\Windows\Start Menu\Programs\MySQL\MySQL Server 5.7,复制

MySQL 5.7 Command Line Client - Unicode 然后修改其中的属性,添加-E选项,

  1. "C:\Program Files\MySQL\MySQL Server 5.7\bin\mysql.exe" "--defaults-file=C:\ProgramData\MySQL\MySQL Server 5.7\my.ini" "-uroot" "-E" "-p" "--default-character-set=utf8"

mysql登录之后就有\g是结束符的提示:

  1. Enter password: ************
  2. Welcome to the MySQL monitor. Commands end with ; or \g.
  3. Your MySQL connection id is 69
  4. Server version: 5.7.3-m13 MySQL Community Server (GPL)
  5.  
  6. Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
  7.  
  8. Oracle is a registered trademark of Oracle Corporation and/or its
  9. affiliates. Other names may be trademarks of their respective
  10. owners.
  11.  
  12. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
  13.  
  14. mysql>

在mysql界面内直接输入help也可以看见:

  1. mysql> help
  2.  
  3. For information about MySQL products and services, visit:
  4. http://www.mysql.com/
  5. For developer information, including the MySQL Reference Manual, visit:
  6. http://dev.mysql.com/
  7. To buy MySQL Enterprise support, training, or other products, visit:
  8. https://shop.mysql.com/
  9.  
  10. List of all MySQL commands:
  11. Note that all text commands must be first on line and end with ';'
  12. ? (\?) Synonym for `help'.
  13. clear (\c) Clear the current input statement.
  14. connect (\r) Reconnect to the server. Optional arguments are db and host.
  15. delimiter (\d) Set statement delimiter.
  16. ego (\G) Send command to mysql server, display result vertically.
  17. exit (\q) Exit mysql. Same as quit.
  18. go (\g) Send command to mysql server.
  19. help (\h) Display this help.
  20. notee (\t) Don't write into outfile.
  21. print (\p) Print current command.
  22. prompt (\R) Change your mysql prompt.
  23. quit (\q) Quit mysql.
  24. rehash (\#) Rebuild completion hash.
  25. source (\.) Execute an SQL script file. Takes a file name as an argument.
  26. status (\s) Get status information from the server.
  27. tee (\T) Set outfile [to_outfile]. Append everything into given outfile.
  28. use (\u) Use another database. Takes database name as argument.
  29. charset (\C) Switch to another charset. Might be needed for processing binlog
  30. with multi-byte charsets.
  31. warnings (\W) Show warnings after every statement.
  32. nowarning (\w) Don't show warnings after every statement.
  33. resetconnection(\x) Clean session context.
  34.  
  35. For server side help, type 'help contents'
  36.  
  37. mysql>

为什么mysql中用\G表示按列方式显示的更多相关文章

  1. mysql学习之-三种安装方式与版本介绍

    MYSQL版本介绍 mysql分alpha,beta,rc,GA四个版本. alpha  暗示这是一个以展示新特性为目的的版本,存在比较多的不稳定因素,还会向代码中添加新新特性beta 以后的beta ...

  2. SQL优化 MySQL版 - 索引分类、创建方式、删除索引、查看索引、SQL性能问题

    SQL优化 MySQL版  - 索引分类.创建方式.删除索引.查看索引.SQL性能问题 作者 Stanley 罗昊 [转载请注明出处和署名,谢谢!] 索引分类 单值索引 单的意思就是单列的值,比如说有 ...

  3. CentOS随笔 - 4.CentOS7安装MySql 5.5.60(下载 tar 方式安装)

    前言 转帖请注明出处: http://www.cnblogs.com/Troy-Lv5/ 由于公司也有php+mysql的项目, 所以今天也把Mysql装了一遍. 为了与以前的程序和数据库兼容, 这次 ...

  4. mysql 中实现行变列

    前言: mysql行列变化,最难的就是将多个列变成多行,使用的比较多的是统计学中行变列,列变行,没有找到现成的函数或者语句,所以自己写了存储过程,使用动态sql来实现,应用业务场景,用户每个月都有使用 ...

  5. MySQL查看版本号的五种方式介绍1111111

    MySQL查看版本号的五种方式介绍 1 命令行模式登录MySQL [root@localhost ~]# mysql -uroot -p Enter password: Welcome to the ...

  6. mysql中用命令行复制表结构(数据)

    mysql中用命令行复制表结构的方法主要有一下几种: 1.只复制表结构到新表 CREATE TABLE 新表 SELECT * FROM 旧表 WHERE 1=2; 或 CREATE TABLE 新表 ...

  7. Linux 中mysql安装(源码安装方式)

    本文是介绍以源码安装的方式编译和安装Mysql 5.6(可以指定安装路径),也可以不采用源码安装方式,直接用安装包的方式. 源码安装方式慎用,容易报错. 1.卸载旧版本 rpm -qa | grep ...

  8. MySQL数据库备份的4种方式

    MySQL备份的4种方式 总结: 备份方法 备份速度 恢复速度 便捷性 功能 一般用于 cp 快 快 一般.灵活性低 很弱 少量数据备份 mysqldump 慢 慢 一般.可无视存储引擎的差异 一般 ...

  9. Mysql查看版本号的五种方式介绍

    Mysql查看版本号的五种方式介绍 作者: 字体:[增加 减小] 类型:转载 时间:2013-05-03   一.使用命令行模式进入mysql会看到最开始的提示符;二.命令行中使用status可以看到 ...

随机推荐

  1. 控制台中使用SetTimer的提醒

    SetTimer是设置定时器,每隔一段时间执行一个操作,原型如下 UINT_PTR SetTimer( HWND hWnd, // 窗口句柄 UINT_PTR nIDEvent, // 定时器ID,多 ...

  2. 二重积分的计算 —— 交换积分顺序(exchange the order of integration)

    交换积分顺序的诀窍在数形结合: 1. 几句顺口溜 后积先定限,限内穿条线,先交下限写,后交上限见 先积 x,画横线(平行于 x 轴),右减左: 先积 y,画竖线(平行于 y 轴),上减下: 2. 简单 ...

  3. golang iris下面的websocket

    最近要做后台主动推送:(iris框架,封装的有wesocket,刚开始以为直接拿过来用,结果不是现在贴一下代码,写一下遇到的坑) func main() {    app := iris.New()  ...

  4. python字符串中的单双引

    python中字符串可以(且仅可以)使用成对的单引号.双引号.三个双引号(文档字符串)包围: 'this is a book' "this is a book" "&qu ...

  5. TLD算法

    TLD算法好牛逼一个,这里有个视频,是作者展示算法的效果,http://www.56.com/u83/v_NTk3Mzc1NTI.html.下面这个csdn博客里有人做的相关总结,感觉挺好的,收藏了! ...

  6. C# DataTable常用方法总结

    https://blog.csdn.net/wangzhen209/article/details/51743118

  7. JavaScript中的数组创建

    JavaScript中的数组创建 数组是一个包含了对象或原始类型的有序集合.很难想象一个不使用数组的程序会是什么样. 以下是几种操作数组的方式: 初始化数组并设置初始值 通过索引访问数组元素 添加新元 ...

  8. 第二课 TXT读取 - 导出 - 选择顶部/底部记录 - 描述性统计 - 分组/排序

    第2课 创建数据 - 我们从创建自己的数据集开始分析.这可以防止阅读本教程的最终用户为得到下面的结果而不得不下载许多文件.我们将把这个数据集导出到一个文本文件中,这样您就可以获得从文本文件中一些拉取数 ...

  9. 1350 Taxi Cab Scheme DAG最小路径覆盖

    对于什么是DAG最小路径覆盖以及解题方法在我的另外的博客已经有了.http://www.cnblogs.com/Potato-lover/p/3980470.html 此题的题意: 公交车(出租车)车 ...

  10. Lazy Stored Properties--无括号时为匿名函数

    第一次使用的时候进行计算和初始化,后面的引用不在进行计算. A lazy stored property is a property whose initial value is not calcul ...