5

I am new to SQLite and trying to work my way through the basics. The problem is when I give it a simple command:

select * from newTable; 

The output is as follows:

GoodState|GoodCapital ShittyState|Raleigh 

Which does not provide the column names on the output. My column names are: State and State_Capital

Is there any option available to make the column names show up on the top of the columns outputted like in MySql?

2 Answers 2

4

Oh. My bad. I should've googled more thoroughly.

The answer is:

.headers on 

This enabled column headers in output.

Sign up to request clarification or add additional context in comments.

Comments

0

Please, if I may be allowed to supplement the answer with the command-line alternative:

sqlite3 -noheader foo.db "select * from newTable" 

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.