Search code examples
sqlsqlitepragma

Pragma in Select request


I wanna to retrieve column's names and rows count in a table in SQLite. Is it possible to do this is one command?

SELECT COUNT(*) FROM tablename

and

PRAGMA table_info(tablename))

Solution

  • A PRAGMA is a separate command, not a (sub)query, and cannot be combined with other SQL statements.