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?
PRAGMA table_info(table_name); will get you a list of all the column names.
To get the column name of a table we use sp_help with the name of the object or table name. sp_columns returns all the column names of the object. The following query will return the table's column names: sp_columns @table_name = 'News'
getColumnNames() This method returns the array of all the column names of the table.
Yes, after logged into sql prompt mode, execute the following each at a time:
.header on .mode column
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With