Documentation Source Text

Check-in [5a0203cdca]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Caution users to have well-defined column names in VIEWs.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 5a0203cdca057c66c90f4b331589a774cbd0c829538138eb2a509890e3249a7c
User & Date: drh 2018-11-26 18:57:57.079
Context
2018-11-28
10:08
Fix a typo on the quirks.html page. (check-in: dd1def55d8 user: drh tags: trunk)
2018-11-26
18:57
Caution users to have well-defined column names in VIEWs. (check-in: 5a0203cdca user: drh tags: trunk)
12:01
Merge typo fix from the 3.25 branch. (check-in: 121aeee579 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to pages/lang.in.
1458
1459
1460
1461
1462
1463
1464










1465
1466
1467
1468
1469
1470
1471
1472
1473
with the [DROP VIEW] command.</p>

<p>^If a <yyterm>column-name</yyterm> list follows 
the <yyterm>view-name</yyterm>, then that list determines
the names of the columns for the view.  ^If the <yyterm>column-name</yyterm>
list is omitted, then the names of the columns in the view are derived
from the names of the result-set columns in the [select-stmt].










Note that the <yyterm>column-name</yyterm> list syntax is only
supported in SQLite versions 3.9.0 ([dateof:3.9.0]) and later.

<tcl>
##############################################################################
Section {CREATE VIRTUAL TABLE} {createvtab} {{CREATE VIRTUAL TABLE}}

RecursiveBubbleDiagram create-virtual-table-stmt
</tcl>







>
>
>
>
>
>
>
>
>
>
|
|







1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
with the [DROP VIEW] command.</p>

<p>^If a <yyterm>column-name</yyterm> list follows 
the <yyterm>view-name</yyterm>, then that list determines
the names of the columns for the view.  ^If the <yyterm>column-name</yyterm>
list is omitted, then the names of the columns in the view are derived
from the names of the result-set columns in the [select-stmt].
The use of <yyterm>column-name</yyterm> list is recommended.  Or, if
<yyterm>column-name</yyterm> list is omitted, then the result
columns in the [SELECT] statement that defines the view should have
well-defined names using the 
"[result-column|AS column-alias]" syntax.
SQLite allows you to create views that depend on automatically 
generated column names, but you should avoid using them since the 
rules used to generate column names are not a defined part of the
interface and might change in future releases of SQLite.

<p>The <yyterm>column-name</yyterm> list syntax was added in
SQLite versions 3.9.0 ([dateof:3.9.0]).

<tcl>
##############################################################################
Section {CREATE VIRTUAL TABLE} {createvtab} {{CREATE VIRTUAL TABLE}}

RecursiveBubbleDiagram create-virtual-table-stmt
</tcl>