On 8/1/18, Charles Leifer <[email protected]> wrote: > You can simply use: > > PRAGMA table_info('my_table') > > To get a list of columns, which you can check against and then > conditionally add your column.
From C-code, you can use the sqlite_table_column_metadata() interface [1] to quickly check for the existance of tables and/or columns. This happens a lot in Fossil, which has an evolving schema but still needs to work with older repositories. [1] https://www.sqlite.org/c3ref/table_column_metadata.html -- D. Richard Hipp [email protected] _______________________________________________ sqlite-users mailing list [email protected] http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

