C API: Number Of Columns In A Result Set
(c3ref/column_count.html)
sqlite3_column_count()
... A SELECT statement
will always have a positive sqlite3_column_count() but depending on the
WHERE clause constraints and the table content, it might return no rows.
See also: sqlite3_data_count()
See also lists of
Objects,
Constants, and
Functions.
|
C API: Compile-Time Authorization Callbacks
(c3ref/set_authorizer.html)
sqlite3_set_authorizer()
... When a table is referenced by a SELECT but no column values are
extracted from that table (for example in a query like
"SELECT count(*) FROM tab") then the SQLITE_READ authorizer callback
is invoked once for that table with a ...
|
UPSERT
(lang_upsert.html)
... To work around this, the SELECT statement should always
include a WHERE clause, even if that WHERE clause is just
"WHERE true".
Ambiguous use of ON:
INSERT INTO t1 SELECT * FROM t2
ON CONFLICT(x) DO UPDATE SET y=excluded ...
|
Hints for Debugging SQLite
(debugging.html)
... What they do is activate the
".treetrace" and ".wheretrace" dot-commands in the command-line
shell, which provide low-level tracing output for the logic that
generates code for SELECT and DML statements and WHERE clauses, respectively.
Call sqlite3ShowExpr() and ...
|
SQLite Foreign Key Support
(foreignkeys.html)
4.3.
ON DELETE and ON UPDATE Actions
... sqlite> UPDATE artist SET artistid = 100 WHERE artistname = 'Dean Martin';
sqlite> SELECT * FROM artist;
artistid artistname
-------- -----------------
2 Frank Sinatra
100 Dean Martin
sqlite> SELECT * FROM track;
trackid trackname trackartist
------- ----------------- -----------
11 That's Amore 100
12 Christmas Blues ...
|
Architecture of SQLite
(arch.html)
... where*.c handles code generation for WHERE clauses on
SELECT, UPDATE and DELETE statements. The files attach.c,
delete.c, insert.c, select.c,
trigger.c
update.c, and vacuum.c handle the code generation
for SQL statements with the ...
|
Floating Point Numbers
(floatingpoint.html)
2.1.1. The ieee754() function
... sqlite> .mode box
sqlite> SELECT ieee754(47.49) AS x;
┌───────────────────────────────┐
│ x │
├───────────────────────────────┤
│ ieee754(6683623321994527,-47) │
└───────────────────────────────┘
Going in the other direction, the 2-argument version of ieee754() takes
the M and E values and converts them into the corresponding F value:
sqlite ...
|
SQLite Autoincrement
(autoinc.html)
3. The AUTOINCREMENT Keyword
If a column has the type INTEGER PRIMARY KEY AUTOINCREMENT then a slightly
different ROWID selection algorithm is used.
The ROWID chosen for the new row is at least one larger than the largest ROWID
that has ever before existed ...
|
CREATE TABLE
(lang_createtable.html)
... AS SELECT Statements
A "CREATE TABLE ... AS SELECT" statement creates and populates a database
table based on the results of a SELECT statement. The table has the same
number of columns as the SELECT statement returns. The name of
each ...
|
C API: Count The Number Of Rows Modified
(c3ref/changes.html)
sqlite3_changes(), sqlite3_changes64()
... For the purposes of this interface, a CREATE TABLE AS SELECT statement
does not count as an INSERT, UPDATE or DELETE statement and hence the rows
added to the new table by the CREATE TABLE AS SELECT statement are not ...
|
Page generated by FTS5 in about 175.80 ms.