How can I display MySQL query result vertically?


With the use of ego, \G option at end of a statement, we can get the result set in vertical format. Consider the following example

mysql> Select * from Student where name = 'Aarav'\G
*************************** 1. row ***************************
  Name: Aarav
RollNo: 150
 Grade: M.SC
1 row in set (0.00 sec)

Updated on: 22-Jun-2020

528 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements