Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

If I go to mysql shell and type SELECT * FROM users I get -

+--------+----------------+---------------------------------+----------+-----------+--------------------+--------------------+
| USERID | NAME           | EMAILID                         | PASSWORD | USER_TYPE | CONTACT_ID_FKUSERS | COMPANY_ID_FKUSERS |
+--------+----------------+---------------------------------+----------+-----------+--------------------+--------------------+
|    137 | X              | b@cc.com                        | #        | ADMIN     |                166 |                110 |
|    138 | Kshitiz        | ksharma@aaa.com                 | asdf     | ADMIN     |                167 |                111 |
+--------+----------------+---------------------------------+----------+-----------+--------------------+--------------------+

Oracle sqlplus shows -

USERID     NAME  EMAILID    PASSWORD   USER_TYPE  CONTACT_ID_FKUSERS COMPANY_ID_FKUSERS
---------- ----- ---------- ---------- ---------- ------------------ ------------------
137        X     b@cc.com   #          ADMIN                     166                110
137        X     b@cc.com   #          ADMIN                     166                110

Sqlite shell shows -

137|X|b@cc.com|#|ADMIN|166|110
138|Kshitiz|ksharma@aaa.com|asdf|ADMIN|167|111
  1. Is there a way to beautify the output from sqlite shell?
  2. Is there an alternative shell that is more functional than default distribution? (CLI clients only)
share|improve this question
1  
re 2: you might try henplus or SQL Workbench/J. Both are Java/JDBC based and should work with SQLite. henplus.sourceforge.net sql-workbench.net –  a_horse_with_no_name Apr 23 '13 at 7:16
add comment

1 Answer

up vote 3 down vote accepted

For "human readable" output, you can use column mode, and turn header output on. That will get you something similar to the sqlplus output in your examples:

sqlite> select * from foo;
234|kshitiz|dba.se
sqlite> .mode column
sqlite> select * from foo;
234         kshitiz     dba.se
sqlite> .headers on
sqlite> select * from foo;
bar         baz         baf
----------  ----------  ----------
234         kshitiz     dba.se
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.