C API: Data Change Notification Callbacks
(c3ref/update_hook.html)
sqlite3_update_hook()
The sqlite3_update_hook() interface registers a callback function
with the database connection identified by the first argument
to be invoked whenever a row is updated, inserted or deleted in
a rowid table.
Any callback set by a previous call to this ...
|
Command Line Shell For SQLite
(cli.html)
6. Querying the database schema
... For example, to see a list of the tables in the database, you
can enter ".tables".
sqlite> .tables
tbl1 tbl2
sqlite>
The ".tables" command is similar to setting list mode then
executing the following query:
SELECT name FROM ...
|
Pragma statements supported by SQLite
(pragma.html)
PRAGMA table_list
PRAGMA table_list;
PRAGMA schema.table_list;
PRAGMA table_list(table-name);
This pragma returns information about the tables and views in the schema,
one table per row of output. The table_list pragma first appeared
in SQLite version 3.37.0 (2021-11 ...
|
C API: Prepared Statement Status
(c3ref/stmt_status.html)
sqlite3_stmt_status()
... For example, if the number of table steps greatly exceeds
the number of table searches or result rows, that would tend to indicate
that the prepared statement is using a full table scan rather than
an index.
This interface is ...
|
SQLite Unlock-Notify API
(unlock_notify.html)
... Before writing to a table, a write (exclusive) lock must be
obtained on that table. Before reading, a read (shared) lock must be
obtained. A connection releases all held table locks when it concludes
its transaction. If a connection cannot ...
|
Profiling SQL Queries
(profile.html)
2. Simple Cases - Rows, Loops and Cycles
... CREATE VIRTUAL TABLE ft USING fts5(text);
CREATE TABLE t1(a, b);
CREATE TABLE t2(c INTEGER PRIMARY KEY, d);
Then, after first executing ".scanstats on":
sqlite3> SELECT * FROM t1, t2 WHERE t2.c=t1.a;
<...query results...> ...
|
Automatic Undo/Redo With SQLite
(undoredo.html)
... For example, suppose you wanted undo/redo on a class (table)
that looks like this:
CREATE TABLE ex1(a,b,c);
Triggers to record changes to table EX1 might look like this:
CREATE TEMP TRIGGER ex1_it AFTER INSERT ON ex1 ...
|
CREATE INDEX
(lang_createindex.html)
... Syntax
The CREATE INDEX command consists of the keywords "CREATE INDEX" followed
by the name of the new index, the keyword "ON", the name of a previously
created table that is to be indexed, and a parenthesized list of table ...
|
DROP TRIGGER
(lang_droptrigger.html)
... Once removed, the trigger definition is no
longer present in the sqlite_schema (or sqlite_temp_schema) table and is
not fired by any subsequent INSERT, UPDATE or DELETE statements.
Note that triggers are automatically dropped when the associated table is
dropped.
This ...
|
C API: Declared Datatype Of A Query Result
(c3ref/column_decltype.html)
sqlite3_column_decltype(), sqlite3_column_decltype16()
... If this statement is a SELECT statement and the Nth column of the
returned result set of that SELECT is a table column (not an
expression or subquery) then the declared type of the table
column is returned. If the ...
|
Page generated by FTS5 in about 155.58 ms.