
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
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
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)
Advertisements