⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 syntax.html

📁 sqlite的帮助文档
💻 HTML
📖 第 1 页 / 共 5 页
字号:
</b></blockquote><a name="H44131"></a><blockquote><b>H44131:</b>  Name resolution in the <i>where</i> term of a DELETE statement  shall be carried out using a name context  with an empty result set and a source set holding  single source element that is the <i>fullname</i> table.</b></blockquote><h3>4.4 SELECT</h3><a name="H45000"></a><blockquote><b>H45000:</b>  The SQLite parser shall accept SELECT statements that  conform to the following syntax:<blockquote><pre>cmd ::= select.select ::= query.select ::= select UNION query.select ::= select UNION ALL query.select ::= select EXCEPT query.select ::= select INTERSECT query.query ::= SELECT distinct resultset from where groupby having orderby limit.distinct ::= .distinct ::= DISTINCT.groupby ::= .groupby ::= GROUP BY exprlist.having ::= .having ::= HAVING expr.orderby ::= .orderby ::= ORDER BY exprlist.limit ::=.limit ::= LIMIT expr.limit ::= LIMIT expr COMMA expr.limit ::= LIMIT expr OFFSET expr.resultset ::= result.resultset ::= resultset COMMA result.result ::= STAR.result ::= tablename DOT STAR.result ::= expr as.from ::= .from ::= FROM sourceset.sourceset ::= source.sourceset ::= sourceset joinop source.source ::= fullname as on using.source ::= LP select RP as on using.as ::= .as ::= AS name.as ::= identifier.on ::= .on ::= ON expr.using ::= .using ::= USING LP columnlist RP.joinop ::= COMMA.joinop ::= JOIN.joinop ::= JOIN_KW JOIN.joinop ::= JOIN_KW JOIN_KW JOIN.joinop ::= JOIN_KW JOIN_KW JOIN_KW JOIN.</pre></blockquote></b></blockquote><a name="H45003"></a><p>  A sequence of <i>query</i> terms connected by UNION, UNION ALL, EXCEPT,  and/or INTERSECT operators is called a "compound query" and the individual  <i>query</i> terms are call "terms of the compound query".</p><blockquote><b>H45003:</b>  The preparation of a statement containing a <i>select</i>  shall fail with an error if the <i>select</i> contains  two terms of the same compound query having a different number of columns  in their result sets.</b></blockquote><a name="H45006"></a><blockquote><b>H45006:</b>  The preparation of a statement containing a <i>select</i>  shall fail with an error if the <i>select</i> contains a compound query that  has an ORDER BY, GROUP BY, HAVING, or LIMIT clause on any term of than  the right-most.</b></blockquote><a name="H45009"></a><blockquote><b>H45009:</b>  The preparation of a statement containing a <i>select</i>  shall fail with an error if the <i>select</i> contains a compound query with  an ORDER BY or GROUP BY clause with a term that is not either  a token-by-token duplicate of the result columns of one of the  compound query terms, or the "AS" name of one of the compound  query terms, or a compile-time integer between 1 and N where N is  the number of columns in each compound query term.</b></blockquote><a name="H45012"></a><blockquote><b>H45012:</b>  The preparation of a statement containing a <i>select</i>  shall fail with an error if the <i>select</i> contains a join with two  or more of the following properties:  <ol>  <li> The NATURAL keyword in the <i>joinop</i> </li>  <li> An ON clause </li>  <li> A USING clause</li>  </ol></b></blockquote><a name="H45015"></a><blockquote><b>H45015:</b>  The preparation of a statement containing a <i>select</i>  shall fail with an error if the <i>select</i> contains a <i>joinop</i>  that uses the keywords RIGHT or FULL.</b></blockquote><a name="H45018"></a><blockquote><b>H45018:</b>  The preparation of a statement containing a <i>select</i>  shall fail with an error if the <i>select</i> contains a <i>joinop</i>  that uses either of the keywords OUTER or LEFT  together with either INNER or CROSS.</b></blockquote><a name="H45021"></a><blockquote><b>H45021:</b>  The preparation of a statement containing a <i>select</i>  shall fail with an error if the <i>select</i> contains a <i>using</i>  that names columns that are not found in both the table to the  immediate right of the join and in the result set of all tables  to the left of the join.</b></blockquote><a name="H45024"></a><blockquote><b>H45024:</b>  The preparation of a statement containing a <i>select</i>  shall fail with an error if the <i>fullname</i> of a <i>source</i>  does not refer to an existing table or view.</b></blockquote><a name="H45027"></a><blockquote><b>H45027:</b>  The preparation of a statement containing a <i>limit</i>  shall fail with an error if any <i>expr</i> within the <i>limit</i>  does not evaluate to a compile-time integer.</b></blockquote><h4>4.4.1 Name resolution with SELECT statements</h4><a name="H45103"></a><blockquote><b>H45103:</b>  Name resolution of a top-level SELECT statement shall use an  empty name context.</b></blockquote><a name="H45106"></a><blockquote><b>H45106:</b>  Name context of a <i>query</i> term shall be  constructed by adding a new inner name context layer  to the name context of the construct containing the <i>query</i>  term.</b></blockquote><a name="H45109"></a><blockquote><b>H45109:</b>  Name resolution of the <i>resultset</i> of a <i>query</i> shall  use the name context of the <i>query</i> with an empty result  set and the source set  configured to the <i>from</i> clause of the query.</b></blockquote><a name="H45112"></a><blockquote><b>H45112:</b>  Name resolution of all child terms of a <i>query</i> other than  <i>resultset</i> child shall use the name context of the <i>query</i>  with the result set configured to be the <i>resultset</i> clause of the  <i>query</i> and with the source set configured to be the  <i>from</i> clause of the query.</b></blockquote><h2>5.0 Other Language Elements</h2><h3>5.1 VACUUM</h3><a name="H44200"></a><blockquote><b>H44200:</b>  The SQLite parser shall accept VACUUM statements that  conform to the following syntax:<blockquote><pre>cmd ::= VACUUM.cmd ::= VACUUM name.</pre></blockquote></b></blockquote><h3>5.2 ANALYZE</h3><a name="H44300"></a><blockquote><b>H44300:</b>  The SQLite parser shall accept ANALYZE statements  that conform to the following syntax:<blockquote><pre>cmd ::= ANALYZE.cmd ::= ANALYZE fullname.</pre></blockquote></b></blockquote><a name="H44303"></a><blockquote><b>H44303:</b>  The preparation of an ANALYZE statement  shall fail with an error if  the <i>fullname</i> is included and does not evaluate to  either an individual table name or the name of a database.</b></blockquote><h3>5.3 REINDEX</h3><a name="H44400"></a><blockquote><b>H44400:</b>  The SQLite parser shall accept REINDEX statements  that conform to the following syntax:<blockquote><pre>cmd ::= REINDEX.cmd ::= REINDEX fullname.</pre></blockquote></b></blockquote><a name="H44403"></a><blockquote><b>H44403:</b>  The preparation of an ANALYZE statement  shall fail with an error if  the <i>fullname</i> is included and does not evaluate to  either an individual table name or the name of a database  or the name of a collating sequence.	</b></blockquote><h3>5.4 PRAGMA</h3><a name="H46000"></a><blockquote><b>H46000:</b>  The SQLite parser shall accept PRAGMA statements  that conform to the following syntax:<blockquote><pre>cmd ::= PRAGMA fullname EQ DELETE.cmd ::= PRAGMA fullname EQ ON.cmd ::= PRAGMA fullname EQ name.cmd ::= PRAGMA fullname EQ expr.cmd ::= PRAGMA fullname LP name RP.cmd ::= PRAGMA fullname LP expr RP.cmd ::= PRAGMA fullname.</pre></blockquote></b></blockquote><a name="H46003"></a><p>  The <i>objectname</i> of the <i>fullname</i> of a PRAGMA is called  the PRAGMA verb.</p><blockquote><b>H46003:</b>  The evaluation of a PRAGMA statement with an unknown verb shall  be a silent no-op.</b></blockquote><h3>5.5 ATTACH</h3><a name="H44500"></a><p>  The SQLite parser shall accept ATTACH statements  that conform to the following syntax:</p><blockquote><b>H44500:</b>  cmd ::= ATTACH database_kw expr AS expr.  database_kw ::= .  database_kw ::= DATABASE.</b></blockquote><a name="H44503"></a><blockquote><b>H44503:</b>  The <i>expr</i> terms of an ATTACH statement that are  identifiers shall be interpreted as string literals.</b></blockquote><a name="H44506"></a><blockquote><b>H44506:</b>  The preparation of an ATTACH statement shall fail with an error  if either <i>expr</i> is not a constant expression.</b></blockquote><a name="H44509"></a><blockquote><b>H44509:</b>  The preparation of an ATTACH statement shall fail with an error  if the second <i>expr</i> evaluates to the name of a database  that is already attached to the database connection.</b></blockquote><h3>5.6 DETACH</h3><a name="H44600"></a><blockquote><b>H44600:</b>  The SQLite parser shall accept DETACH statements  that conform to the following syntax:<blockquote><pre>cmd ::= DETACH database_kw expr.</pre></blockquote></b></blockquote><a name="H44603"></a><blockquote><b>H44603:</b>  The <i>expr</i> term of an DETACH statement that is an  identifier shall be interpreted as string literals.</b></blockquote><a name="H44606"></a><blockquote><b>H44606:</b>  The preparation of an DETACH statement shall fail with an error  if the <i>expr</i> is not a constant expression.</b></blockquote><a name="H44609"></a><blockquote><b>H44609:</b>  The preparation of an DETACH statement shall fail with an error  if the <i>expr</i> does not evaluate to the   name of an attached database other than "temp" or "main".</b></blockquote><h3>5.7 EXPLAIN</h3><a name="H44700"></a><blockquote><b>H44700:</b>  The SQLite parser shall accept the EXPLAIN keyword as a prefix  to other valid SQL statements, as shown by the following syntax:<blockquote><pre>sql_statement ::= EXPLAIN cmd SEMI.</pre></blockquote></b></blockquote><h3>5.8 EXPLAIN QUERY PLAN</h3><a name="H44800"></a><blockquote><b>H44800:</b>  The SQLite parser shall accept EXPLAIN QUERY PLAY as a prefix  to other valid SQL statements, as shown by the following syntax:<blockquote><pre>sql_statement ::= EXPLAIN QUERY PLAN cmd SEMI.</pre></blockquote></b></blockquote><h2>6.0 Common Language Subelements</h2><h3>6.1 Expressions</h3><a name="H47000"></a><blockquote><b>H47000:</b>  The SQLite parser shall accept expressions that  conform to the following syntax:<blockquote><pre>expr ::= BITNOT expr.expr ::= CASE case_operand case_exprlist case_else END.expr ::= CAST LP expr AS typetoken RP.expr ::= EXISTS LP select RP.expr ::= function_name LP STAR RP.expr ::= function_name LP distinct exprlist RP.expr ::= LP expr RP.expr ::= LP select RP.expr ::= MINUS expr.expr ::= NOT expr.expr ::= PLUS expr.expr ::= RAISE LP IGNORE RP.expr ::= RAISE LP ABORT COMMA name RP.expr ::= RAISE LP FAIL COMMA name RP.expr ::= RAISE LP ROLLBACK COMMA name RP.expr ::= VARIABLE.expr ::= expr AND expr.expr ::= expr BITAND expr.expr ::= expr BITOR expr.expr ::= expr LSHIFT expr.expr ::= expr RSHIFT expr.expr ::= expr COLLATE ids.expr ::= expr CONCAT expr.expr ::= expr EQ expr.expr ::= expr NE expr.expr ::= expr IS NOT NULL.expr ::= expr IS NULL.expr ::= expr ISNULLexpr ::= expr NOTNULL.expr ::= expr LT expr.expr ::= expr GT expr.expr ::= expr GE expr.expr ::= expr LE exp

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -