How for MySQL to output just the data without headers, lines, bars within its console interface?
I.e., I’m already inside the MySQL command-line interface and want to run a single query to output just the data without headers, lines, bars, or any other additional output.
Current behavior:
SET @json = '{"city": "New York", "zip": "10001"}';
SELECT @json;
+--------------------------------------+
| @json |
+--------------------------------------+
| {"city": "New York", "zip": "10001"} |
+--------------------------------------+
1 row in set (0.000 sec)
Hoping behavior:
SELECT @json;
{"city": "New York", "zip": "10001"}
Reason for asking:
I have a super long json to take a look, and all these headers, lines, bars are creating too much noises on my console, and I don’t want to scroll pages after pages to see my data, or my SELECT statement.