CREATE VIEW
(lang_createview.html)
... Description
The CREATE VIEW command assigns a name to a pre-packaged
SELECT statement.
Once the view is created, it can be used in the FROM clause
of another SELECT in place of a table name.
If the "TEMP" or ...
|
Date And Time Functions
(lang_datefunc.html)
... SELECT unixepoch();
SELECT strftime('%s');
Compute the number of days since the signing of the US Declaration
of Independence.
SELECT julianday('now') - julianday('1776-07-04');
Compute the number of seconds since a particular moment in 2004:
SELECT unixepoch() - unixepoch ...
|
The SQLite Query Optimizer Overview
(optoverview.html)
8. Choosing Between Multiple Indexes
... CREATE TABLE ex2(x,y,z);
CREATE INDEX ex2i1 ON ex2(x);
CREATE INDEX ex2i2 ON ex2(y);
SELECT z FROM ex2 WHERE x=5 AND y=6;
For the SELECT statement above, the optimizer can use the ex2i1 index ...
|
The DBSTAT Virtual Table
(dbstat.html)
4. Example uses of the dbstat virtual table
... SELECT count(*) FROM dbstat('aux1') WHERE name='xyz';
SELECT pageno FROM dbstat('aux1',1) WHERE name='xyz';
To see how efficiently the content of a table is stored on disk,
compute the amount of space used to hold actual content ...
|
Profiling SQL Queries
(profile.html)
3. Complex Cases - Rows, Loops and Cycles
... sqlite3> WITH cnt(i) AS (
SELECT 1 UNION SELECT i+1 FROM cnt WHERE i<100
)
SELECT
*, (SELECT d FROM t2 WHERE c=ft.rowid)
FROM
(SELECT count(*), a FROM t1 GROUP BY a) AS v1 CROSS JOIN ...
|
SQLite FTS3 and FTS4 Extensions
(fts3.html)
1.4. Simple FTS Queries
As for all other SQLite tables, virtual or otherwise, data is retrieved
from FTS tables using a SELECT statement.
FTS tables can be queried efficiently using SELECT statements of two
different forms:
Query by rowid. If the WHERE clause of ...
|
C API: Column Names In A Result Set
(c3ref/column_name.html)
sqlite3_column_name(), sqlite3_column_name16()
These routines return the name assigned to a particular column
in the result set of a SELECT statement. The sqlite3_column_name()
interface returns a pointer to a zero-terminated UTF-8 string
and sqlite3_column_name16() returns a pointer to a zero-terminated ...
|
C API: Run-Time Limit Categories
(c3ref/c_limit_attached.html)
SQLITE_LIMIT_LENGTH, SQLITE_LIMIT_SQL_LENGTH, SQLITE_LIMIT_COLUMN, SQLITE_LIMIT_EXPR_DEPTH, SQLITE_LIMIT_COMPOUND_SELECT, SQLITE_LIMIT_VDBE_OP ...
... SQLITE_LIMIT_COLUMN
The maximum number of columns in a table definition or in the
result set of a SELECT or the maximum number of columns in an index
or in an ORDER BY or GROUP BY clause.
SQLITE_LIMIT_EXPR_DEPTH
The maximum depth ...
|
Indexes On Expressions
(expridx.html)
... 100.00, one can say:
SELECT * FROM account_change WHERE acct_no=$xyz AND abs(amt)>=10000;
Or, to list all changes to one particular account ($xyz) in order of
decreasing magnitude, one can write:
SELECT * FROM account_change WHERE acct_no=$xyz
ORDER ...
|
Datatypes In SQLite version 2
(datatypes.html)
... sqlite> SELECT typeof('abc'+123);
numeric
sqlite> SELECT typeof('abc'||123);
text
For table columns, the datatype is determined by the type declaration
of the CREATE TABLE statement. The datatype is text if and only if
the type ...
|
Page generated by FTS5 in about 185.29 ms.