博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
为什么mysql中用\G表示按列方式显示
阅读量:4353 次
发布时间:2019-06-07

本文共 2891 字,大约阅读时间需要 9 分钟。

关于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 69Server 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 itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql>

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

mysql> helpFor 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 binlogwith 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>

 

转载于:https://www.cnblogs.com/stono/p/8227394.html

你可能感兴趣的文章
macOS 下安装tomcat
查看>>
字符串格式化复习笔记
查看>>
c++ 宏定义调用不定参数的函数
查看>>
动态规划典型例题--背包问题九讲
查看>>
Qt之QHeaderView自定义排序(终极版)
查看>>
python----logging
查看>>
LBP特征 学习笔记
查看>>
与TIME_WAIT相关的几个内核参数修改测试讨论结论
查看>>
(转)用graph-easy描绘kubenetes描绘k8s组件逻辑图
查看>>
request.getParameter()获取前台值为null
查看>>
路飞学城Python-Day186
查看>>
django Paginator分页插件
查看>>
关于APP自动化工程的一点小想法
查看>>
vc++post方式登录网站
查看>>
框架标签
查看>>
求职基础复习之冒泡排序c++版
查看>>
【TCP/IP】Ethernet II VS 802.3
查看>>
WebService学习总结(二)——WebService相关概念介绍
查看>>
webpack构建react应用三:使用webpack Loaders 模块加载器(一)
查看>>
Java JDBC
查看>>