当前位置:网站首页>MySQL query uses \ g, column to row
MySQL query uses \ g, column to row
2022-04-23 05:39:00 【GroupiesM】
Mysql At the end of the query, you can use \G、\g、; To specify the query format ,( Only in command line mode , use navicat、dbeaver And other connection tools do not support )
- Query usage
\G, Result column to row
mysql> select * from emp limit 2\G
*************************** 1. row ***************************
empno: 7369
ename: SMITH
job: CLERK
mgr: 7902
hiredate: 1980-12-17
sal: 800.00
comm: NULL
deptno: 20
*************************** 2. row ***************************
empno: 7499
ename: ALLEN
job: SALESMAN
mgr: 7698
hiredate: 1981-02-20
sal: 1600.00
comm: 300.00
deptno: 30
2 rows in set (0.00 sec)
- Query usage
\gAnd use;The effect is the same
mysql> select * from emp limit 2\g
+-------+-------+----------+------+------------+---------+--------+--------+
| empno | ename | job | mgr | hiredate | sal | comm | deptno |
+-------+-------+----------+------+------------+---------+--------+--------+
| 7369 | SMITH | CLERK | 7902 | 1980-12-17 | 800.00 | NULL | 20 |
| 7499 | ALLEN | SALESMAN | 7698 | 1981-02-20 | 1600.00 | 300.00 | 30 |
+-------+-------+----------+------+------------+---------+--------+--------+
2 rows in set (0.00 sec)
mysql> select * from emp limit 2;
+-------+-------+----------+------+------------+---------+--------+--------+
| empno | ename | job | mgr | hiredate | sal | comm | deptno |
+-------+-------+----------+------+------------+---------+--------+--------+
| 7369 | SMITH | CLERK | 7902 | 1980-12-17 | 800.00 | NULL | 20 |
| 7499 | ALLEN | SALESMAN | 7698 | 1981-02-20 | 1600.00 | 300.00 | 30 |
+-------+-------+----------+------+------------+---------+--------+--------+
2 rows in set (0.00 sec)
mysql>
版权声明
本文为[GroupiesM]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230534405928.html
边栏推荐
- JSON.
- Reading notes of modern methods of C language programming
- solidity合约DOS攻击
- After adding qmenu to qtoolbutton and QPushButton, remove the triangle icon in the lower right corner
- Simple and basic use of switch and if
- Map对象 map.get(key)
- QSslSocket::connectToHostEncrypted: TLS initialization failed
- College entrance examination volunteer filling reference
- Contract lock loophole
- C, class library
猜你喜欢

QT displays the specified position and size of the picture

Branch and loop statements
![[triangle Yang Hui triangle printing odd even cycle JS for break cycle]](/img/9a/6cdc00e6056a1a47d2fbb8b9a8e975.png)
[triangle Yang Hui triangle printing odd even cycle JS for break cycle]

创建进程内存管理copy_mm - 进程与线程(九)

‘EddiesObservations‘ object has no attribute ‘filled‘

Breadth first search topics (BFS)

Some pits used by uni

On the use of constant pointer and pointer constant -- exercise (record)

3d slicer中拉直体的生成

Frequently asked interview questions - 2 (computer network)
随机推荐
AcWing 1096. Detailed notes of Dungeon Master (3D BFS) code
Arithmetic and logical operations
可执行程序执行流程
热键,界面可视化配置(界面交互)
踩坑:nacos利用startup.cmd -m standalone启动错误
提升独立站转化率攻略 | 挽回弃购用户
Executable program execution process
Strategy for improving the conversion rate of independent stations | recovering abandoned users
Date增加天数
Utf8 to STD: string and STD: string to utf8
Common interview questions - 4 (MySQL)
On the use of constant pointer and pointer constant -- exercise (record)
[untitled] Notepad content writing area
Establish excel bookkeeping book through setting context menu
No.1.#_6 Navicat快捷键
catkin_package到底干了什么
Golang implements Ping connectivity detection case through exec module
可執行程序執行流程
Escape characters \ splicing of data formats
Map对象 map.get(key)