/ Check-in [8b8fa0ff]
Login

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

Overview
Comment:Added typeof() operator. Minor additions for ATTACH/DETACH. (CVS 987)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 8b8fa0fff26107912f0bec4e44df207c7885e273
User & Date: jplyon 2003-05-29 04:21:39
Context
2003-05-29
17:43
Modify the windows locking code so that it works correctly for a database being shared between Win95/98/ME and WinNT/2K/XP systems. Ticket #310. (CVS 988) check-in: 8c402db7 user: drh tags: trunk
04:21
Added typeof() operator. Minor additions for ATTACH/DETACH. (CVS 987) check-in: 8b8fa0ff user: jplyon tags: trunk
2003-05-19
23:55
Fix segfault that occurs when opening a non-existing database in the shell then immediately doing ".q". (CVS 986) check-in: e8566cf5 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.58 2003/05/17 01:39:40 drh Exp $}
            4  +set rcsid {$Id: lang.tcl,v 1.59 2003/05/29 04:21:39 jplyon 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>
................................................................................
   140    140   
   141    141   <p>You can read from and write to an attached database, but you cannot 
   142    142   alter the schema of an attached database.  You can only CREATE and 
   143    143   DROP in the original database.</p>
   144    144   
   145    145   <p>You cannot create a new table with the same name as a table in 
   146    146   an attached database, but you can attach a database which contains
   147         -tables whose names are duplicates of tables in the main database.</p>
          147  +tables whose names are duplicates of tables in the main database.  It is 
          148  +also permissible to attach the same database file multiple times.</p>
   148    149   
   149    150   <p>Tables in an attached database can be referred to using the syntax 
   150    151   <i>database-name.table-name</i>.  If an attached table doesn't have 
   151    152   a duplicate table name in the main database, it doesn't require a 
   152    153   database name prefix.  When a database is attached, all of its 
   153    154   tables which don't have duplicate names become the 'default' table
   154    155   of that name.  Any tables of that name attached afterwards require the table 
................................................................................
   304    305   puts {
   305    306   <p>The CREATE INDEX command consists of the keywords "CREATE INDEX" followed
   306    307   by the name of the new index, the keyword "ON", the name of a previously
   307    308   created table that is to be indexed, and a parenthesized list of names of
   308    309   columns in the table that are used for the index key.
   309    310   Each column name can be followed by one of the "ASC" or "DESC" keywords
   310    311   to indicate sort order, but the sort order is ignored in the current
   311         -implementation.</p>
          312  +implementation.  Sorting is always done in ascending order.</p>
   312    313   
   313    314   <p>There are no arbitrary limits on the number of indices that can be
   314    315   attached to a single table, nor on the number of columns in an index.</p>
   315    316   
   316    317   <p>If the UNIQUE keyword appears between CREATE and INDEX then duplicate
   317    318   index entries are not allowed.  Any attempt to insert a duplicate entry
   318    319   will result in an error.</p>
................................................................................
   651    652   Section {DETACH DATABASE} detach
   652    653   
   653    654   Syntax {sql-command} {
   654    655   DETACH [DATABASE] <database-name>
   655    656   }
   656    657   
   657    658   puts {
   658         -<p>This statement detaches an additional database file previously attached
   659         -using the <a href="#attach">ATTACH DATABASE</a> statement.</p>
          659  +<p>This statement detaches an additional database connection previously 
          660  +attached using the <a href="#attach">ATTACH DATABASE</a> statement.  It
          661  +is possible to have the same database file attached multiple times using 
          662  +different names, and detaching one connection to a file will leave the 
          663  +others intact.</p>
   660    664   
   661    665   <p>This statement will fail if SQLite is in the middle of a transaction.</p>
   662    666   }
   663    667   
   664    668   
   665    669   Section {DROP INDEX} dropindex
   666    670   
................................................................................
   996   1000   with the <i>Y</i>-th character and which is <i>Z</i> characters long.
   997   1001   The left-most character of <i>X</i> is number 1.  If <i>Y</i> is negative
   998   1002   the the first character of the substring is found by counting from the
   999   1003   right rather than the left.  If SQLite is configured to support UTF-8,
  1000   1004   then characters indices refer to actual UTF-8 characters, not bytes.</td>
  1001   1005   </tr>
  1002   1006   
         1007  +<tr>
         1008  +<td valign="top" align="right">typeof(<i>X</i>)</td>
         1009  +<td valign="top">Return the type of the expression <i>X</i>.  The only 
         1010  +return values are "numeric" and "text".  SQLite's type handling is 
         1011  +explained in <a href="datatypes.html">Datatypes in SQLite</a>.</td>
         1012  +</tr>
         1013  +
  1003   1014   <tr>
  1004   1015   <td valign="top" align="right">upper(<i>X</i>)</td>
  1005   1016   <td valign="top">Return a copy of input string <i>X</i> converted to all
  1006   1017   upper-case letters.  The implementation of this function uses the C library
  1007   1018   routine <b>toupper()</b> which means it may not work correctly on 
  1008   1019   UTF-8 strings.</td>
  1009   1020   </tr>