From 63847496f14c813a5d80efd5b7de0f1294ffe1e3 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 13 Apr 2024 16:07:11 +0200 Subject: Adding upstream version 3.45.1. Signed-off-by: Daniel Baumann --- www/lang_naming.html | 166 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 166 insertions(+) create mode 100644 www/lang_naming.html (limited to 'www/lang_naming.html') diff --git a/www/lang_naming.html b/www/lang_naming.html new file mode 100644 index 0000000..f60c0d6 --- /dev/null +++ b/www/lang_naming.html @@ -0,0 +1,166 @@ + + + + + +Database Object Name Resolution + + + +
+ + + +
+
+Small. Fast. Reliable.
Choose any three. +
+ + +
+
+ + + +
+
+
+ + + + +

+ In SQLite, a database object (a table, index, trigger or view) is identified + by the name of the object and the name of the database that it resides in. + Database objects may reside in the main database, the temp database, or in + an attached database. + +

+ The syntax of the DROP TABLE, DROP INDEX, DROP VIEW, DROP TRIGGER, + REINDEX, ALTER TABLE and many other commands all permit the user to + specify a database object either by its name alone, or by a combination of + its name and the name of its database. If no database is specified as part + of the object reference, then SQLite searches the main, temp and all attached + databases for an object with a matching name. The temp database is searched + first, followed by the main database, followed all attached databases in the + order that they were attached. The reference resolves to the first match + found. For example: + +

+      /* Add a table named 't1' to the temp, main and an attached database */
+      ATTACH 'file.db' AS aux;
+      CREATE TABLE t1(x, y);
+      CREATE TEMP TABLE t1(x, y);
+      CREATE TABLE aux.t1(x, y);
+
+      DROP TABLE t1;         /* Drop table in temp database */
+      DROP TABLE t1;         /* Drop table in main database */
+      DROP TABLE t1;         /* Drop table in aux database */
+
+ +

+ If a schema name is specified as part of an object reference, it must be + either "main", or "temp" or the schema-name of an attached database. + Like other SQL identifiers, schema names are case-insensitive. + If a schema name is specified, then only that one schema is searched for + the named object. + +

+ Most object references may only resolve to a specific type of object (for + example a reference that is part of a DROP TABLE statement may only resolve + to a table object, not an index, trigger or view). However in some contexts + (e.g. REINDEX) an object reference may be resolve to more than one type + of object. When searching database schemas for a named object, objects of + types that cannot be used in the context of the reference are always + ignored. +

This page last modified on 2022-01-08 05:02:57 UTC

+ -- cgit v1.2.3