Wednesday 23 September 2009

Formatting Output from MySQL prompt

I'm not the biggest fan of MySQL and on the occasions I do use it I always forgot how to get useful results from my queries. To get results paged to less and have them display vertically, you can do this

mysql> \P less
PAGER set to 'less'

mysql> select * from blahblah \G

No comments:

Post a Comment