const char* sqlite3_column_table_name( sqlite3_stmt* stmt, int cidx ); const void* sqlite3_column_table_name16( sqlite3_stmt* stmt, int cidx );
stmt
A prepared statement.
cidx
A column index. The first column has an index
of zero (0
).
The name of the source table for the given result column.
These functions return the name of the source table that is
associated with a SELECT
result column. Returned pointers will remain valid until
sqlite3_finalize()
is
called on the statement,
or until one of these functions is called with the same column
index. SQLite will take care of all memory management for the
buffers returned by these functions.
Data is only available for result columns that are derived directly from a column reference. If a result column is defined as an expression or subquery, a NULL will be returned.
These functions are only available if the SQLite library was
compiled with the SQLITE_ENABLE_COLUMN_METADATA
build
option.
sqlite3_column_database_name() [C API, Ap G], sqlite3_column_origin_name() [C API, Ap G], SQLITE_ENABLE_COLUMN_METADATA [Build Opt, Ap A]