Showing records from MySQL tables with many columns
Lately I’ve been working on a system that has a lot of big tables (with a lot of columns), and often I want to do something like:
1
SELECT * FROM users WHERE id = 1;
But there are so many columns that it doesn’t look good on a terminal:
1
2
3
4
5
+----+-------------------+---------------------+---------------------+---------------------+-----------------------+--------+-------------------------------------+----------------------------------------------------------------------------------------------------+
| id | username | created_at | updated_at | issuer | issuer_id | points | email | picture_url |
+----+-------------------+---------------------+---------------------+---------------------+-----------------------+--------+-------------------------------------+----------------------------------------------------------------------------------------------------+
| 1 | carlos | 2016-01-31 13:03:36 | 2016-11-04 18:15:56 | accounts.google.com | 111394444444498347111 | 100 | NULL | https://lh4.googleusercontent.com/-laaaaaajmcc/AAAAAAAAAAA/AAAAAAAAAAA/qwertyuioaa/s96-c/photo.jpg |
+----+-------------------+---------------------+---------------------+---------------------+-----------------------+--------+-------------------------------------+----------------------------------------------------------------------------------------------------+