I was thinking that "best" to verify the structure of my database with SQLite in QT / C ++ What's the way I am using SQLite, so there is a file in which my databases are included, and I have to make sure that, when the program launches, the database should be structured in that way - that is, there are every X tables in it , Proper names, etc. Can anyone point me in the right direction? Thanks a lot!
You can get a list of all the tables in the database with this query:
Select sqlite_master from tbl_name; And then returning for each table, run this query to get the column information
pragma table_info (my_table); For the program, each row of the result set will be included: a column index, column name, column type affinity, even the column faucet, and the default value of the column. (I'm assuming here that you want to run SQL queries in your SQLite interface from your database.)
Comments
Post a Comment