开发者

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);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜