Get Column Name
I am working on IPhone Application and I want to integrate SQLite in my application.
开发者_高级运维I want ro get Column name which are retrieve in my sql query
For Example
SELECT name, phoneNo FROM contectInfo;
In the sql query I am getting proper data, but I want to know, How Can I get the column name that are name and phoneNo?
Can any one Help me to find out this solution?
You can access column name in Objective C
N will be the column number.
const char *sqlite3_column_name(sqlite3_stmt*, int N);
or you can get list of column names using
PRAGMA table_info(table_name);
精彩评论