1

The same thing as Find SQLite Column Names in Empty Table with the exception that I have a view that is part of an attached database. Because the database is attached the PRAGMA table_info( your_table_name ); solution doesnt work. Furthermore, trying to parse the query string is also ridiculous because it is a view query.

Community
  • 1
  • 1
chacham15
  • 13,719
  • 26
  • 104
  • 207

1 Answers1

3

PRAGMA AttachedDbName.table_info(your_table_name)

Another technique: prepare a statement of the form select * from your_table_name;, then use sqlite3_column_count, sqlite3_column_name et al. You don't need to actually run the statement, just prepare it.

Igor Tandetnik
  • 50,461
  • 4
  • 56
  • 85