I'm going through Python+SQlite tutorial. I'm creating tables, adding information, deleting it etc. The only way I can check how the table looks like is in cmd and it really doesn't look nice and readible. What I mean is that the content is fine, but the way the table is displayed isn't. Is there any way, maybe, some additional program to download or sth, that I can see my table like it's an actual TABLE and not some: Name | Age | Job ?
-
A tool that can do much more than just display the contents of an SQLite DB: sqlitebrowser.orgScott Hunter– Scott Hunter2014-09-04 16:48:16 +00:00Commented Sep 4, 2014 at 16:48
-
Take a look at this question, there is a list of sqlite GUIs and their pros and cons: stackoverflow.com/questions/835069/…Tianyun Ling– Tianyun Ling2014-09-04 17:12:55 +00:00Commented Sep 4, 2014 at 17:12
Add a comment
|
1 Answer
You can set the display mode to 'column' for a slightly more readable printout of your data.
.mode column
SELECT * FROM table;
If you'd like to view a readable version in a text file:
.mode column
.headers on
.output my_data.txt
SELECT * FROM table;
.exit
open my_data.txt
Other modes:
.mode MODE ?TABLE? Set output mode where MODE is one of:
csv Comma-separated values
column Left-aligned columns. (See .width)
html HTML <table> code
insert SQL insert statements for TABLE
line One value per line
list Values delimited by .separator string
tabs Tab-separated values
tcl TCL list elements