41

I use sqlite3 console to debug my app while it is executing in Android. Is there a way to show also column names (not only data) with data in result of sql query?

Prizoff
  • 4,486
  • 4
  • 41
  • 69

1 Answers1

77

Yes, after logged into sql prompt mode, execute the following each at a time:

.header on
.mode column
waqaslam
  • 67,549
  • 16
  • 165
  • 178
  • 2
    further, if you run `.help` it will give you all the options available to run on sql-prompt – waqaslam Oct 10 '12 at 10:29
  • 5
    If your query results are too wide to fit on one line, then setting `.mode line` can be useful: it prints the fields one per line, in the format ` = `. – ntc2 Feb 11 '21 at 08:10