Bạn có thể sử dụng dấu gạch chéo ngược theo sau là G tức là G thay vì dấu chấm phẩy (;). Cú pháp như sau để hiển thị tên cơ sở dữ liệu theo chiều dọc trong dòng lệnh MySQL
SHOW DATABASES \G
Để hiển thị tất cả các tên cơ sở dữ liệu theo chiều dọc, bạn cần sử dụng \ G. Truy vấn như sau
mysql> show databases\G
Sau đây là kết quả
*************************** 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)