mysql client : don't show columns names and grid

Monday, May 30, 2016 · 1 minute · 75 words

Default mysql client behaviour is to show column names and grid when returning results  but how to get rid of this decorations ? 

+-------+
| pv_id |
+-------+
|     1 |
|     2 |
|     3 |
+-------+

To keep only the data results without the decorations, use the -sN option on the mysql client like this :

mysql -sN ...

and you’ll get :

1
2
3

Perfect for playing with the shell !