Name

sqlite3_column_count() — Get the number of result columns in a statement

Definition

int sqlite3_column_count( sqlite3_stmt* stmt );
stmt

A prepared statement.

Returns

The number of columns returned by a prepared statement.

Description

This function returns the number of columns available in a row result. Column indexes start at zero (0), so if this function returns 5, value column indexes are 0 to 4. The value zero (0) is returned if the statement does not return any result.

Get Using SQLite now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.