1、 -1- APPENDIX A SQL Reference The SQLite library understands most of the standard SQL language. But it does omit some features while at the same time adding a few features of its own. This reference is an overview of the SQL syntax implemented by SQLite, taken directly from the original documentatio
2、n on the SQLite website (www.sqlite.org/lang.html) and slightly edited. Many low-level productions are omitted. For detailed information on the language that SQLite understands, refer to the source code and the grammar file parse.y in the source distribution. In all of the syntax diagrams that follo
3、w, literal text is shown in bold. Nonterminal symbols are shown in italic. Operators that are part of the syntactic markup itself are shown as regular. ALTER TABLE sql-statement := ALTER TABLE database-name . table-name alteration alteration := RENAME TO new-table-name alteration := ADD COLUMN colum
4、n-def SQLites version of the ALTER TABLE command allows the user to rename or add a new column to an existing table. It is not possible to remove a column from a table. ATTACH DATABASE sql-statement := ATTACH DATABASE database-filename AS database-name The ATTACH DATABASE statement adds a preexisting database file to the current database connection. If the filename contains punctuation characters it must be quoted. The names “main” and “temp” refer to the main database and the databa