Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Reword some testable statements related to scalar subqueries in lang_expr.html. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
573431382acf5eb33d69c084ea2f4d35 |
User & Date: | dan 2010-09-02 19:21:27.000 |
Context
2010-09-02
| ||
23:37 | Tweaks to the formatting of the requirements traceability matrix. (check-in: e4a472e7f6 user: drh tags: trunk) | |
19:21 | Reword some testable statements related to scalar subqueries in lang_expr.html. (check-in: 573431382a user: dan tags: trunk) | |
11:52 | Add section to lang_expr.html for the EXISTS operator. (check-in: c8e9d99b1d user: dan tags: trunk) | |
Changes
Changes to pages/lang.in.
︙ | ︙ | |||
1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 | EXISTS operator evaluates to 1. ^If executing the SELECT would return no rows at all, then the EXISTS operator evaluates to 0. <p>^The number of columns in each row returned by the SELECT statement (if any) and the specific values returned have no effect on the results of the EXISTS operator. ^In particular, rows containing NULL values are not handled any differently from rows without NULL values. <h3>Table Column Names</h3> <p>^A column name can be any of the names defined in the [CREATE TABLE] statement or one of the following special identifiers: "<b>ROWID</b>", "<b>OID</b>", or "<b>_ROWID_</b>". ^These special identifiers all describe the unique integer key (the [rowid]) associated with every row of every table. ^The special identifiers only refer to the row key if the [CREATE TABLE] statement does not define a real column with the same name. ^The rowid can be used anywhere a regular column can be used.</p> | > > > > > > > > > > > > > > < | | < < < < < | < < < < < | < | < | < < < | 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 | EXISTS operator evaluates to 1. ^If executing the SELECT would return no rows at all, then the EXISTS operator evaluates to 0. <p>^The number of columns in each row returned by the SELECT statement (if any) and the specific values returned have no effect on the results of the EXISTS operator. ^In particular, rows containing NULL values are not handled any differently from rows without NULL values. <h3>Scalar Subqueries</h3> <p>^A [SELECT] statement enclosed in parentheses may appear as a scalar quantity. ^A [SELECT] used as a scalar quantity must return a result set with a single column. ^The result of the expression is the value of the only column in the first row returned by the SELECT statement. ^If the SELECT yields more than one result row, all rows after the first are ignored. ^If the SELECT yields no rows, then the value of the expression is NULL. <p>^All types of [SELECT] statement, including aggregate and compound SELECT queries (queries with keywords like UNION or EXCEPT) are allowed as scalar subqueries. <h3>Table Column Names</h3> <p>^A column name can be any of the names defined in the [CREATE TABLE] statement or one of the following special identifiers: "<b>ROWID</b>", "<b>OID</b>", or "<b>_ROWID_</b>". ^These special identifiers all describe the unique integer key (the [rowid]) associated with every row of every table. ^The special identifiers only refer to the row key if the [CREATE TABLE] statement does not define a real column with the same name. ^The rowid can be used anywhere a regular column can be used.</p> <p>^A [SELECT] statement used as either a scalar subquery or as the right-hand operand of an IN, NOT IN or EXISTS expression may contain references to columns in the outer query. Such a subquery is known as a correlated subquery. ^A correlated subquery is reevaluated each time its result is required. ^An uncorrelated subquery is evaluated only once and the result reused as necessary. <tcl>hd_fragment castexpr {CAST expression}</tcl> <h3>CAST expressions</h3> <p>A CAST expression is used to convert the value of <expr> to a different [storage class] in a similar way to the conversion that takes place when a [column affinity] is applied to a value. ^Application of a CAST |
︙ | ︙ |