I want to perform a data copy from one DB to another, but I want to do so only on tables contain a "unit_id" column.
I thought I can use the PRAGMA table_info(table_name) to help me with identifying whether or not the table "table_name" has the column "unit_id".
I read the documantation and realized I can check the "name" column. but without the documantation, how can one know the columns names returned from a PRAGMA usage?
Is there something like .schema "table name" that I can use on a PRAGMA result?
example:
PRAGMA table_info(units);
returns this:
0|id|INTEGER|1||1
1|unit_type_id|INTEGER|1||0
2|site_id|INTEGER|1||0
3|modbus_address|INTEGER|1||0
4|Name|TEXT|1||0
5|Description|TEXT|0||0
6|Needs_Download|INTEGER|1||0
7|needed_reset_apps|INTEGER|0||0
but how can i know which column is what?!
Thanks, Jim.