0

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 ?

2
  • A tool that can do much more than just display the contents of an SQLite DB: sqlitebrowser.org Commented 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/… Commented Sep 4, 2014 at 17:12

1 Answer 1

1

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
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.