I want to migrate my iPhone app to a new database version. Since I don\'t have some version saved, I need to check if certain column names exist.
This Stackoverflow
I know it's too late but this will help other.
To find the column name of the table, you should execute select * from tbl_name
and you will get the result in sqlite3_stmt *
. and check the column iterate over the total fetched column. Please refer following code for the same.
// sqlite3_stmt *statement ;
int totalColumn = sqlite3_column_count(statement);
for (int iterator = 0; iterator
This will print all the column names of the result set.