如何在MySQL命令行中垂直列出数据库?
您可以使用反斜杠后跟G即\G代替分号(;)。语法如下所示,以在MySQL命令行中垂直显示数据库名称
SHOW DATABASES \G
要垂直显示所有数据库名称,您需要使用\G。查询如下
mysql> show databases\G
以下是输出
*************************** 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)
热门推荐
10 香港老妈结婚祝福语简短
11 毕业立体贺卡祝福语简短
12 简短新年年会祝福语
13 评论小品祝福语大全简短
14 恭喜师兄结婚祝福语简短
15 员工集体辞职祝福语简短
16 高中新生祝福语 简短
17 装修祝福语男生搞笑简短
18 生日开业蛋糕祝福语简短