How do you set the terminal output's width to 80 columns in MariaDB?

Viewed 14

I am not referring to database columns, I am referring to Terminal Columns. How do you ask MariaDB to format its output for a standard 80 columns terminal ? Right now it outputs in however many columns fit the output so I basically have to fullscreen the terminal which is inconvenient.

1 Answers

I assume with "MariaDB" you mean the command line client.

The simple answer is: you can't.

If your results are hard to read, try vertical output, instead of ; as a delimiter of a SQL statement use \G or start command line client with option -E.

MariaDB [test]> select * from information_schema.columns limit 1\G
*************************** 1. row ***************************
           TABLE_CATALOG: def
            TABLE_SCHEMA: tmp
              TABLE_NAME: bulk_null
             COLUMN_NAME: a
        ORDINAL_POSITION: 1
          COLUMN_DEFAULT: NULL
             IS_NULLABLE: NO
               DATA_TYPE: int
CHARACTER_MAXIMUM_LENGTH: NULL
  CHARACTER_OCTET_LENGTH: NULL
       NUMERIC_PRECISION: 10
           NUMERIC_SCALE: 0
      DATETIME_PRECISION: NULL
      CHARACTER_SET_NAME: NULL
          COLLATION_NAME: NULL
             COLUMN_TYPE: int(11)
              COLUMN_KEY: PRI
                   EXTRA: auto_increment
              PRIVILEGES: select,insert,update,references
          COLUMN_COMMENT: 
            IS_GENERATED: NEVER
   GENERATION_EXPRESSION: NULL
Related