/ Check-in [cc541b10]
Login

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

Overview
Comment:Added documentation about the new CASE expression. (CVS 552)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:cc541b10302774b9004babbfb3a11b1f65d4b863
User & Date: drh 2002-05-06 11:47:33
Context
2002-05-08
11:54
Fix for tickets #32 and #33: Generate the names of the result set early, before doing the flattening optimization or evaluating subqueries. Otherwise, the result set column names are generated incorrectly or after they are needed. (CVS 553) check-in: 08f27cb3 user: drh tags: trunk
2002-05-06
11:47
Added documentation about the new CASE expression. (CVS 552) check-in: cc541b10 user: drh tags: trunk
11:34
Fix typos in the man-page (sqlite.1) and remove two unused files. Patches from Andreas Rottmann. (CVS 551) check-in: 5772d319 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to www/lang.tcl.

     1      1   #
     2      2   # Run this Tcl script to generate the sqlite.html file.
     3      3   #
     4         -set rcsid {$Id: lang.tcl,v 1.32 2002/04/12 10:09:00 drh Exp $}
            4  +set rcsid {$Id: lang.tcl,v 1.33 2002/05/06 11:47:33 drh Exp $}
     5      5   
     6      6   puts {<html>
     7      7   <head>
     8      8     <title>Query Language Understood By SQLite</title>
     9      9   </head>
    10     10   <body bgcolor=white>
    11     11   <h1 align=center>
................................................................................
   358    358   
   359    359   <p>You cannot COPY, INSERT or UPDATE a view.  Views are read-only.</p>
   360    360   }
   361    361   
   362    362   Section DELETE delete
   363    363   
   364    364   Syntax {sql-statement} {
   365         -DELETE FROM <table-name> [WHERE <expression>]
          365  +DELETE FROM <table-name> [WHERE <expr>]
   366    366   }
   367    367   
   368    368   puts {
   369    369   <p>The DELETE command is used to remove records from a table.
   370    370   The command consists of the "DELETE FROM" keywords followed by
   371    371   the name of the table from which records are to be removed.
   372    372   </p>
................................................................................
   431    431   For additional information about virtual machine instructions see
   432    432   the <a href="arch.html">architecture description</a> or the documentation
   433    433   on <a href="opcode.html">available opcodes</a> for the virtual machine.</p>
   434    434   }
   435    435   
   436    436   Section expression expr
   437    437   
   438         -Syntax {expression} {
   439         -<expression> <binary-op> <expression> |
   440         -<expression> <like-op> <expression> |
   441         -<unary-op> <expression> |
   442         -( <expression> ) |
          438  +Syntax {expr} {
          439  +<expr> <binary-op> <expr> |
          440  +<expr> <like-op> <expr> |
          441  +<unary-op> <expr> |
          442  +( <expr> ) |
   443    443   <column-name> |
   444    444   <table-name> . <column-name> |
   445    445   <literal-value> |
   446    446   <function-name> ( <expr-list> | STAR ) |
   447         -<expression> ISNULL |
   448         -<expression> NOTNULL |
   449         -<expression> [NOT] BETWEEN <expression> AND <expression> |
   450         -<expression> [NOT] IN ( <value-list> ) |
   451         -<expression> [NOT] IN ( <select-statement> ) |
   452         -( <select-statement> )
          447  +<expr> ISNULL |
          448  +<expr> NOTNULL |
          449  +<expr> [NOT] BETWEEN <expr> AND <expr> |
          450  +<expr> [NOT] IN ( <value-list> ) |
          451  +<expr> [NOT] IN ( <select-statement> ) |
          452  +( <select-statement> ) |
          453  +CASE [<expr>] ( WHEN <expr> THEN <expr> )+ [ELSE <expr>] END
   453    454   } {like-op} {
   454    455   LIKE | GLOB | NOT LIKE | NOT GLOB
   455    456   }
   456    457   
   457    458   puts {
   458    459   <p>This section is different from the others.  Most other sections of
   459    460   this document talks about a particular SQL command.  This section does
................................................................................
   961    962   information.</p>  
   962    963   }
   963    964   
   964    965   Section SELECT select
   965    966   
   966    967   Syntax {sql-statement} {
   967    968   SELECT <result> [FROM <table-list>]
   968         -[WHERE <expression>]
          969  +[WHERE <expr>]
   969    970   [GROUP BY <expr-list>]
   970         -[HAVING <expression>]
          971  +[HAVING <expr>]
   971    972   [<compound-op> <select>]*
   972    973   [ORDER BY <sort-expr-list>]
   973    974   [LIMIT <integer> [OFFSET <integer>]]
   974    975   } {result} {
   975    976   <result-column> [, <result-column>]*
   976    977   } {result-column} {
   977         -STAR | <expression> [ [AS] <string> ]
          978  +STAR | <expr> [ [AS] <string> ]
   978    979   } {table-list} {
   979    980   <table> [, <table>]*
   980    981   } {table} {
   981    982   <table-name> [AS <alias>] |
   982    983   ( <select> ) [AS <alias>]
   983    984   } {sort-expr-list} {
   984    985   <expr> [<sort-order>] [, <expr> [<sort-order>]]*
................................................................................
  1048   1049   }
  1049   1050   
  1050   1051   Section UPDATE update
  1051   1052   
  1052   1053   Syntax {sql-statement} {
  1053   1054   UPDATE [ OR <conflict-algorithm> ] <table-name>
  1054   1055   SET <assignment> [, <assignment>] 
  1055         -[WHERE <expression>]
         1056  +[WHERE <expr>]
  1056   1057   } {assignment} {
  1057         -<column-name> = <expression>
         1058  +<column-name> = <expr>
  1058   1059   }
  1059   1060   
  1060   1061   puts {
  1061   1062   <p>The UPDATE statement is used to change the value of columns in 
  1062   1063   selected rows of a table.  Each assignment in an UPDATE specifies
  1063   1064   a column name to the left of the equals sign and an arbitrary expression
  1064   1065   to the right.  The expressions may use the values of other columns.