Hi, see http://www.sqlite.org/capi3ref.html#sqlite3_column_count.
Do this: sqlite3_stmt *pStmnt; sqlite3_prepare(YourDbHandle, "select * from YourTable limit 1", -1, &pStmnt, 0); int NumberOfColumns = sqlite3_column_count(pStmnt); sqlite3_finalize(pStmnt) Martin baxy77bax wrote: > hi, > > my question is how to get the number of columns in an existing table. > example if i can retrieve the number of rows with SELECT count(*) FROM table > , is there also some simple query to do the same thing for counting the > number of columns > > thnx > > r > > _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users