Documentation Source Text

Check-in [a9db62dba3]
Login

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

Overview
Comment:Simplifications to the description of keywords. Avoid any decision of the keywords that can, sometimes, be used as identifiers because that adds nothing to the conversation.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: a9db62dba343c46fe6ad6b6829df4cf736aa67b3
User & Date: drh 2010-01-06 23:32:05
Context
2010-01-07
15:58
Updates to the aggregate function documentation. check-in: 716c872b13 user: drh tags: trunk
2010-01-06
23:32
Simplifications to the description of keywords. Avoid any decision of the keywords that can, sometimes, be used as identifiers because that adds nothing to the conversation. check-in: a9db62dba3 user: drh tags: trunk
20:57
Fix a typo on the books.html page. check-in: 82cfff06e6 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to pages/lang.in.

2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
....
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994

<tcl>
#############################################################################
# A list of keywords.  A asterisk occurs after the keyword if it is on
# the fallback list.
#
set keyword_list [lsort {
   ABORT*
   ACTION*
   ADD
   AFTER*
   ALL
   ALTER
   ANALYZE*
   AND
   AS
   ASC*
   ATTACH*
   AUTOINCREMENT
   BEFORE*
   BEGIN*
   BETWEEN
   BY*
   CASCADE*
   CASE
   CAST*
   CHECK
   COLLATE
   COLUMN*
   COMMIT
   CONFLICT*
   CONSTRAINT
   CREATE
   CROSS
   CURRENT_DATE*
   CURRENT_TIME*
   CURRENT_TIMESTAMP*
   DATABASE*
   DEFAULT
   DEFERRED*
   DEFERRABLE
   DELETE
   DESC*
   DETACH*
   DISTINCT
   DROP
   END*
   EACH*
   ELSE
   ESCAPE
   EXCEPT
   EXCLUSIVE*
   EXISTS
   EXPLAIN*
   FAIL*
   FOR*
   FOREIGN
   FROM
   FULL
   GLOB*
   GROUP
   HAVING
   IF*
   IGNORE*
   IMMEDIATE*
   IN
   INDEX
   INDEXED*
   INITIALLY*
   INNER
   INSERT
   INSTEAD*
   INTERSECT
   INTO
   IS
   ISNULL
   JOIN
   KEY*
   LEFT
   LIKE*
   LIMIT
   MATCH*
   NATURAL
   NO*
   NOT
   NOTNULL
   NULL
   OF*
   OFFSET*
   ON
   OR
   ORDER
   OUTER
   PLAN*
   PRAGMA*
   PRIMARY
   QUERY*
   RAISE*
   REFERENCES
   REGEXP*
   REINDEX*
   RELEASE*
   RENAME*
   REPLACE*
   RESTRICT*
   RIGHT
   ROLLBACK
   ROW*
   SAVEPOINT*
   SELECT
   SET
   TABLE
   TEMP*
   TEMPORARY*
   THEN
   TO
   TRANSACTION
   TRIGGER*
   UNION
   UNIQUE
   UPDATE
   USING
   VACUUM*
   VALUES
   VIEW*
   VIRTUAL*
   WHEN
   WHERE
}]

hd_puts {<DIV class="pdf_section">}
Section {SQLite Keywords} keywords {{*SQL keyword} {SQL keywords}}
hd_puts {</DIV>}
................................................................................
<blockquote>
<table width="100%"><tr>
<td align="left" valign="top" width="20%">
<tcl>
set n [llength $keyword_list]
set nCol 5
set nRow [expr {($n+$nCol-1)/$nCol}]
set nRowStar 0
set nRowNoStar 0
set i 0
foreach word $keyword_list {
  if {[string index $word end]=="*"} {
    set word [string range $word 0 end-1]
    set font i
    incr nRowStar
  } else {
    set font b
    incr nRowNoStar
  }
  if {$i==$nRow} {
    hd_puts "</td><td valign=\"top\" align=\"left\" width=\"20%\">"
    set i 1
  } else {
    incr i
  }
  hd_puts "$word<br>\n"
}
</tcl>
</td></tr></table></blockquote>)^

<p>SQLite is extended to allow many keywords to be used unquoted
as the names of databases, tables, indices, triggers, views, columns,
user-defined functions, collations, attached databases, and virtual
function modules.
^(The following subset of <tcl>hd_puts $nRowStar</tcl>
SQLite keywords can be used unquoted as object names:</p>

<blockquote>
<table width="100%"><tr>
<td align="left" valign="top" width="20%">
<tcl>
set nCol 5
set nRow [expr {($nRowStar+$nCol-1)/$nCol}]
set i 0
foreach word $keyword_list {
  if {[string index $word end]!="*"} continue
  set word [string range $word 0 end-1]
  if {$i==$nRow} {
    hd_puts "</td><td valign=\"top\" align=\"left\" width=\"20%\">"
    set i 1
  } else {
    incr i
  }
  hd_puts "$word<br>\n"
}
</tcl>
</td></tr></table></blockquote>)^

<p>^(The next subset of <tcl>hd_puts $nRowNoStar</tcl>
keywords are those that must be quoted in
order to be used as object names:</p>

<blockquote>
<table width="100%"><tr>
<td align="left" valign="top" width="20%">
<tcl>
set nCol 5
set nRow [expr {($nRowNoStar+$nCol-1)/$nCol}]
set i 0
foreach word $keyword_list {
  if {[string index $word end]=="*"} continue
  if {$i==$nRow} {
    hd_puts "</td><td valign=\"top\" align=\"left\" width=\"20%\">"
    set i 1
  } else {
    incr i
  }
  hd_puts "$word<br>\n"
}
</tcl>
</td></tr></table></blockquote>)^

<h2>Special names</h2>

<p>The following are not keywords in SQLite, but are used as names of 
system objects.  They can be used as an identifier for a different 
type of object.</p>

<blockquote class="pdf_keywords"><b>
  _ROWID_<br>
  MAIN<br>
  OID<br>
  ROWID<br>
  SQLITE_MASTER<br>
  SQLITE_SEQUENCE<br>
  SQLITE_TEMP_MASTER<br>
  TEMP<br>
</b></blockquote>







|
|

|


|


|
|

|
|

|
|

|


|

|



|
|
|
|

|


|
|


|
|



|

|
|
|



|


|
|
|


|
|


|





|

|

|

|



|
|




|
|

|
|

|
|
|
|
|
|


|
|



|
|



|




|

|
|







 







<
<


<
<
<
<
<
<
<
<










<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
....
2897
2898
2899
2900
2901
2902
2903


2904
2905








2906
2907
2908
2909
2910
2911
2912
2913
2914
2915






































































<tcl>
#############################################################################
# A list of keywords.  A asterisk occurs after the keyword if it is on
# the fallback list.
#
set keyword_list [lsort {
   ABORT
   ACTION
   ADD
   AFTER
   ALL
   ALTER
   ANALYZE
   AND
   AS
   ASC
   ATTACH
   AUTOINCREMENT
   BEFORE
   BEGIN
   BETWEEN
   BY
   CASCADE
   CASE
   CAST
   CHECK
   COLLATE
   COLUMN
   COMMIT
   CONFLICT
   CONSTRAINT
   CREATE
   CROSS
   CURRENT_DATE
   CURRENT_TIME
   CURRENT_TIMESTAMP
   DATABASE
   DEFAULT
   DEFERRED
   DEFERRABLE
   DELETE
   DESC
   DETACH
   DISTINCT
   DROP
   END
   EACH
   ELSE
   ESCAPE
   EXCEPT
   EXCLUSIVE
   EXISTS
   EXPLAIN
   FAIL
   FOR
   FOREIGN
   FROM
   FULL
   GLOB
   GROUP
   HAVING
   IF
   IGNORE
   IMMEDIATE
   IN
   INDEX
   INDEXED
   INITIALLY
   INNER
   INSERT
   INSTEAD
   INTERSECT
   INTO
   IS
   ISNULL
   JOIN
   KEY
   LEFT
   LIKE
   LIMIT
   MATCH
   NATURAL
   NO
   NOT
   NOTNULL
   NULL
   OF
   OFFSET
   ON
   OR
   ORDER
   OUTER
   PLAN
   PRAGMA
   PRIMARY
   QUERY
   RAISE
   REFERENCES
   REGEXP
   REINDEX
   RELEASE
   RENAME
   REPLACE
   RESTRICT
   RIGHT
   ROLLBACK
   ROW
   SAVEPOINT
   SELECT
   SET
   TABLE
   TEMP
   TEMPORARY
   THEN
   TO
   TRANSACTION
   TRIGGER
   UNION
   UNIQUE
   UPDATE
   USING
   VACUUM
   VALUES
   VIEW
   VIRTUAL
   WHEN
   WHERE
}]

hd_puts {<DIV class="pdf_section">}
Section {SQLite Keywords} keywords {{*SQL keyword} {SQL keywords}}
hd_puts {</DIV>}
................................................................................
<blockquote>
<table width="100%"><tr>
<td align="left" valign="top" width="20%">
<tcl>
set n [llength $keyword_list]
set nCol 5
set nRow [expr {($n+$nCol-1)/$nCol}]


set i 0
foreach word $keyword_list {








  if {$i==$nRow} {
    hd_puts "</td><td valign=\"top\" align=\"left\" width=\"20%\">"
    set i 1
  } else {
    incr i
  }
  hd_puts "$word<br>\n"
}
</tcl>
</td></tr></table></blockquote>)^