Small, Fast, Reliable.
Choose any three.

About Sitemap Documentation Download License News Developers Support

## SQLite C Interface

### Column Names In A Result Set

>     const char *sqlite3_column_name(sqlite3_stmt*, int N);
>     const void *sqlite3_column_name16(sqlite3_stmt*, int N);

These routines return the name assigned to a particular column in the result set of a SELECT statement. The sqlite3_column_name() interface returns a pointer to a UTF8 string and sqlite3_column_name16() returns a pointer to a UTF16 string. The first parameter is the prepared statement that implements the SELECT statement. The second parameter is the column number. The left-most column is number 0.

The returned string pointer is valid until either the prepared statement is destroyed by sqlite3_finalize() or until the next call sqlite3_column_name() or sqlite3_column_name16() on the same column.

If sqlite3_malloc() fails during the processing of either routine (for example during a conversion from UTF-8 to UTF-16) then a NULL pointer is returned.

See also lists of Objects, Constants, and Functions.

This page last modified 2007/11/22 00:41:31 UTC