Reputation: 309
I started learning SQLite and read that I can get the column information about any table with the PRAGMA table_info(table-name)
command without specifying column names anywhere in the file.
How does PRAGMA
know which columns we need for any particular table? Do we have to specify any information about the table in a bin file or environment file?
Upvotes: 2
Views: 5741
Reputation: 3537
Hima, you got everything upside down.
Of course, PRAGMA table_info returns columns of table - it's the purpose of this instruction.
How does it work:
CREATE TABLE NewTable(col1 int, col2 text)
statement issued in sqlitedb at some point of timeUpvotes: 3