如何在mysql命令行中垂直显示记录? [英] How to show records vertically in mysql command line?

查看:165
本文介绍了如何在mysql命令行中垂直显示记录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

先解释一下我的想法{我不擅长英语}

First explaining what is on my mind {I'm not good at English}

Alan Storm的博客上,我发现了有关mysql的棘手问题.我不确定他是否在使用命令行.评论部分在那边关闭了,所以我把这个查询放在这里.

On Alan Storm's blog, I found a tricky thing about mysql. I am not sure if he's using the command line or not. The comment section has closed over there, so I'm putting this query here instead.

mysql> select * from eav_entity_type\G

当我在命令行(基于Windows dos的cmd)中运行此语句时,我只是返回正常的select语句结果.

When I run this statement in my command line (Window dos based cmd) I just return normal select statement results.

请让我知道如何获得该博客中所示的结果,或者它仅仅是代码美化器的一部分.

Please let me know how could I get result as shown in that blog or if it is just part of a code beautifier.

推荐答案

我认为您使用的是\g而不是\G.除非使用\G,否则将获得默认的输出模式.默认值为\g.

I think you are using \g instead of \G. Unless you use \G you get default output pattern. Default is \g.

mysql> show databases\g
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| test               |
+--------------------+
3 rows in set (0.00 sec)

mysql> show databases\G
*************************** 1. row ***************************
Database: information_schema
*************************** 2. row ***************************
Database: mysql
*************************** 3. row ***************************
Database: test
3 rows in set (0.00 sec)

这篇关于如何在mysql命令行中垂直显示记录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆