为什么mysql中用\G表示按列方式显示
关于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选项,
"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是结束符的提示:
Enter password: ************
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 69
Server version: 5.7.3-m13 MySQL Community Server (GPL) Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql>
在mysql界面内直接输入help也可以看见:
mysql> help For information about MySQL products and services, visit:
http://www.mysql.com/
For developer information, including the MySQL Reference Manual, visit:
http://dev.mysql.com/
To buy MySQL Enterprise support, training, or other products, visit:
https://shop.mysql.com/ List of all MySQL commands:
Note that all text commands must be first on line and end with ';'
? (\?) Synonym for `help'.
clear (\c) Clear the current input statement.
connect (\r) Reconnect to the server. Optional arguments are db and host.
delimiter (\d) Set statement delimiter.
ego (\G) Send command to mysql server, display result vertically.
exit (\q) Exit mysql. Same as quit.
go (\g) Send command to mysql server.
help (\h) Display this help.
notee (\t) Don't write into outfile.
print (\p) Print current command.
prompt (\R) Change your mysql prompt.
quit (\q) Quit mysql.
rehash (\#) Rebuild completion hash.
source (\.) Execute an SQL script file. Takes a file name as an argument.
status (\s) Get status information from the server.
tee (\T) Set outfile [to_outfile]. Append everything into given outfile.
use (\u) Use another database. Takes database name as argument.
charset (\C) Switch to another charset. Might be needed for processing binlog
with multi-byte charsets.
warnings (\W) Show warnings after every statement.
nowarning (\w) Don't show warnings after every statement.
resetconnection(\x) Clean session context. For server side help, type 'help contents' mysql>
为什么mysql中用\G表示按列方式显示的更多相关文章
- mysql学习之-三种安装方式与版本介绍
MYSQL版本介绍 mysql分alpha,beta,rc,GA四个版本. alpha 暗示这是一个以展示新特性为目的的版本,存在比较多的不稳定因素,还会向代码中添加新新特性beta 以后的beta ...
- SQL优化 MySQL版 - 索引分类、创建方式、删除索引、查看索引、SQL性能问题
SQL优化 MySQL版 - 索引分类.创建方式.删除索引.查看索引.SQL性能问题 作者 Stanley 罗昊 [转载请注明出处和署名,谢谢!] 索引分类 单值索引 单的意思就是单列的值,比如说有 ...
- CentOS随笔 - 4.CentOS7安装MySql 5.5.60(下载 tar 方式安装)
前言 转帖请注明出处: http://www.cnblogs.com/Troy-Lv5/ 由于公司也有php+mysql的项目, 所以今天也把Mysql装了一遍. 为了与以前的程序和数据库兼容, 这次 ...
- mysql 中实现行变列
前言: mysql行列变化,最难的就是将多个列变成多行,使用的比较多的是统计学中行变列,列变行,没有找到现成的函数或者语句,所以自己写了存储过程,使用动态sql来实现,应用业务场景,用户每个月都有使用 ...
- MySQL查看版本号的五种方式介绍1111111
MySQL查看版本号的五种方式介绍 1 命令行模式登录MySQL [root@localhost ~]# mysql -uroot -p Enter password: Welcome to the ...
- mysql中用命令行复制表结构(数据)
mysql中用命令行复制表结构的方法主要有一下几种: 1.只复制表结构到新表 CREATE TABLE 新表 SELECT * FROM 旧表 WHERE 1=2; 或 CREATE TABLE 新表 ...
- Linux 中mysql安装(源码安装方式)
本文是介绍以源码安装的方式编译和安装Mysql 5.6(可以指定安装路径),也可以不采用源码安装方式,直接用安装包的方式. 源码安装方式慎用,容易报错. 1.卸载旧版本 rpm -qa | grep ...
- MySQL数据库备份的4种方式
MySQL备份的4种方式 总结: 备份方法 备份速度 恢复速度 便捷性 功能 一般用于 cp 快 快 一般.灵活性低 很弱 少量数据备份 mysqldump 慢 慢 一般.可无视存储引擎的差异 一般 ...
- Mysql查看版本号的五种方式介绍
Mysql查看版本号的五种方式介绍 作者: 字体:[增加 减小] 类型:转载 时间:2013-05-03 一.使用命令行模式进入mysql会看到最开始的提示符;二.命令行中使用status可以看到 ...
随机推荐
- Android开机键失灵启动手机的解决的方法
问题描写叙述 Android手机的关机键损坏,无法开机. 解决方法 将手机通过USB线链接电脑,进入命令行.找到adb命令所在文件夹.执行例如以下命令: adb reboot 注意:用这样的方法的前提 ...
- apt-get常见错误
安装错误:“E: Unmet dependencies.” 原因:非正常停止apt-get install * 错误提示:E: Unmet dependencies. Try 'apt-get - ...
- Linux shell脚本中shift的用法说明【转】
本文转载自:http://blog.csdn.net/zhu_xun/article/details/24796235 Linux shell脚本中shift的用法说明 shift命令用于对参数的移动 ...
- iOS10 推送通知 UserNotifications
简介 新框架 获取权限 获取用户设置 注册APNS,获取deviceToken 本地推送流程 远程推送流程 通知策略(Category+Action) 附件通知 代理回调 简介 iOS10新增了Use ...
- WPF中ListBox ListView数据翻页浏览笔记(强调:是数据翻页,非翻页动画)
ListBox和ListView在应用中,常常有需求关于每页显示固定数量的数据,然后通过Timer自动或者手动翻页操作,本文介绍到的就是该动作的实现. 一.重点 对于ListBox和ListView来 ...
- UVA-1335(UVALive-3177) Beijing Guards 贪心 二分
题面 题意:有n个人为成一个圈,其中第i个人想要r[i]种不同的礼物,相邻的两个人可以聊天,炫耀自己的礼物.如果两个相邻的人拥有同一种礼物,则双方都会很不高兴,问最少需要多少种不同的礼物才能满足所有人 ...
- Core篇——初探IdentityServer4(OpenID Connect模式)
Core篇——初探IdentityServer4(OpenID Connect客户端验证) 目录 1.Oauth2协议授权码模式介绍2.IdentityServer4的OpenID Connect客户 ...
- Java基础2一基础语法
1.标识符 定义:在Java中给类名.方法名.包名,参数名等命名时使用的字符序列即标识符 规则: 由字母.数字.下划线和$符组成 不能以数字开头 长度无限制 严格区分大小写 不能是java中的保留关键 ...
- BluetoothA2dp蓝牙音箱的连接
1:权限 <uses-feature android:name="android.hardware.bluetooth_le" android:required=" ...
- VHDL之package
Pacakge Frequently used pieces of VHDL code are usually written in the form of COMPONENTS, FUNCTIONS ...