Display query results without table line within mysql shell ( nontabular output )

–raw, -r

For tabular output, the “boxing” around columns enables one column value to be distinguished from another. For nontabular output (such as is produced in batch mode or when the –batch or –silent option is given), special characters are escaped in the output so they can be identified easily. Newline, tab, NUL, and backslash are written as \n, \t, \0, and \\. The –raw option disables this character escaping.

The following example demonstrates tabular versus nontabular output and the use of raw mode to disable escaping:

% mysql
mysql> SELECT CHAR(92);
+----------+
| CHAR(92) |
+----------+
| \        |
+----------+

% mysql --silent
mysql> SELECT CHAR(92);
CHAR(92)
\\

% mysql --silent --raw
mysql> SELECT CHAR(92);
CHAR(92)
\

From MySQL Docs

Leave a Comment