Name
sqlite3_column_type() — Get the datatype of a result column
Definition
int sqlite3_column_type( sqlite3_stmt* stmt, int cidx );
-
stmt
A prepared and executed statement.
-
cidx
A column index. The first column has an index of zero (
0
).- Returns
The native datatype code of a result value.
Description
This function returns the initial datatype of the value in a
result column. For a given column, this value may change from
one result row to the next. If this function is used, it should
be called before any sqlite3_column_xxx()
function. Once a type
conversion takes place, the result of this function is
undefined.
The return value will be SQLITE_INTEGER
, SQLITE_FLOAT
, SQLITE_TEXT
, SQLITE_BLOB
, or SQLITE_NULL
.
See Also
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.