Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

9
  • 14
    Despite the Windows being not case-sensitive, this G must be capitalized. Commented Oct 29, 2013 at 18:40
  • 5
    Just to clarify the above comment, when you type SELECT * FROM sometable\G you are sending the string to the mysql command line client, not Windows, which is why the G is case sensitive Commented Mar 24, 2014 at 15:31
  • 3
    Except it doesn't work that well with large quantities of records. Commented Oct 8, 2015 at 8:13
  • 1
    The linked documentation says: "ego (\G) Send command to mysql server, display result vertically.Be careful about defining a delimiter that might occur within other words. For example, if you define the delimiter as X, you will be unable to use the word INDEX in statements." Commented Oct 9, 2015 at 8:57
  • 1
    @AkashVerma For psql, you can apparently use \x before the sql command to set output to key-value pairs instead of tabulated. See: stackoverflow.com/a/26040852 Commented Sep 7, 2022 at 9:00