Name
sqlite3_sql() — Get the SQL of a prepared statement
Definition
const char* sqlite3_sql( sqlite3_stmt stmt );
-
stmt A prepared statement.
- Returns
The SQL string used to prepare a statement.
Description
This function returns the original SQL string used to prepare
the given statement. The statement must have been prepared with
a _v2 version of prepare. If
the statement was prepared with the original sqlite3_prepare() or sqlite3_prepare16() functions,
this function will always
return NULL.
The returned statement will always be encoded in UTF-8, even if
sqlite3_prepare16_v2()
was used to prepare the statement.
See Also
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access