Open JrgMyr opened 4 years ago
Ok, I found something myself. Apologies for not finding it during previous researches. There is a PRAGMA table_info which doubles as a table-valued function and can be used like this in a regular query:
select * from pragma_table_info('tablename');
Out of curiosity: where is this info stored inside the database?
It's all in sqlite_master. Everything you need to know about any table or view is stored there.
The only exception is when you create temporary objects (CREATE TEMP ...) - in that case they are in sqlite_temp_master.
Where are the fields (row) information stored inside of a database? The table "sqlite_master" has tables and views but not the field info.
Is there any other way to get to the field names in a given table than parsing the CREATE TABLE code? I imagine a second management table that links rows to table names. Does this exist?
Best, Jörg