We\'ve recently had the need to add columns to a few of our existing SQLite database tables. This can be done with ALTER TABLE ADD COLUMN. Of course, if the table has alre
For those want to use pragma table_info()
's result as part of a larger SQL.
select count(*) from
pragma_table_info('')
where name='';
The key part is to use pragma_table_info('
instead of pragma table_info('
.
This answer is inspired by @Robert Hawkey 's reply. The reason I post it as a new answer is I don't have enough reputation to post it as comment.