

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to list databases vertically in MySQL command line?
You can use backward slash followed by G i.e. \G instead of semicolon(;). The syntax is as follows to display database names vertically in MySQL command line
SHOW DATABASES \G
To display all database names vertically, you need to use \G. The query is as follows
mysql> show databases\G
The following is the output
*************************** 1. row *************************** Database: business *************************** 2. row *************************** Database: database1 *************************** 3. row *************************** Database: databasesample *************************** 4. row *************************** Database: education *************************** 5. row *************************** Database: hello *************************** 6. row *************************** Database: information_schema *************************** 7. row *************************** Database: javadatabase2 *************************** 8. row *************************** Database: javasampledatabase *************************** 9. row *************************** Database: mybusiness *************************** 10. row *************************** Database: mydatabase *************************** 11. row *************************** Database: mysql *************************** 12. row *************************** Database: performance_schema *************************** 13. row *************************** Database: rdb *************************** 14. row *************************** Database: sample *************************** 15. row *************************** Database: sampledatabase *************************** 16. row *************************** Database: schemasample *************************** 17. row *************************** Database: sys *************************** 18. row *************************** Database: test *************************** 19. row *************************** Database: test3 *************************** 20. row *************************** Database: universitydatabase 20 rows in set (0.05 sec)
- Related Questions & Answers
- How to display records vertically in MySQL command line?
- How to open MySQL command line on Windows10?
- How to upgrade MySQL server from command line?
- The MySQL Command-Line Client
- Return list of databases in MySQL?
- Connect to MySQL database from command line
- How to repair MySQL tables from the command line?
- How to adjust display settings of MySQL command line?
- How to create a database on command line in MySQL?
- MySQL command line client for Windows?
- How can we return to windows command shell from MySQL command line tool?
- Connecting to MySQL database from the command line?
- Command Line Interpreters
- How to find the MySQL data directory from command line in Windows?
- How to run TestNG from command line?
Advertisements