Small. Fast. Reliable.
Choose any three.

SQLite Requirement Matrix Details
lang_expr.html

Index Summary Markup Original


R-61970-26480-33028-36412-61944-06610-41249-40014 tcl slt th3 src

Canonical usage: syntax/expr.html

/* IMP: R-61970-26480 */
# EVIDENCE-OF: R-61970-26480 -- syntax diagram expr

R-47443-11280-39343-26300-13209-50193-13307-46522 tcl slt th3 src

Canonical usage: syntax/literal-value.html

/* IMP: R-47443-11280 */
# EVIDENCE-OF: R-47443-11280 -- syntax diagram literal-value

R-54197-31877-57350-43471-52348-15226-37714-44266 tcl slt th3 src

Canonical usage: syntax/raise-function.html

/* IMP: R-54197-31877 */
# EVIDENCE-OF: R-54197-31877 -- syntax diagram raise-function

R-19713-52738-52485-51770-14412-64430-18771-01641 tcl slt th3 src

Canonical usage: syntax/select-stmt.html

/* IMP: R-19713-52738 */
# EVIDENCE-OF: R-19713-52738 -- syntax diagram select-stmt

R-29190-16177-49676-56162-41955-57961-52271-56322 tcl slt th3 src

Canonical usage: syntax/common-table-expression.html

/* IMP: R-29190-16177 */
# EVIDENCE-OF: R-29190-16177 -- syntax diagram common-table-expression

R-60687-03927-28728-46307-01187-04245-57381-09290 tcl slt th3 src

Canonical usage: syntax/compound-operator.html

/* IMP: R-60687-03927 */
# EVIDENCE-OF: R-60687-03927 -- syntax diagram compound-operator

R-15218-64377-10732-10708-39996-49168-39639-07301 tcl slt th3 src

Canonical usage: syntax/join-clause.html

/* IMP: R-15218-64377 */
# EVIDENCE-OF: R-15218-64377 -- syntax diagram join-clause

R-59355-25880-50978-14585-20539-54763-44134-61379 tcl slt th3 src

Canonical usage: syntax/join-constraint.html

/* IMP: R-59355-25880 */
# EVIDENCE-OF: R-59355-25880 -- syntax diagram join-constraint

R-24999-30014-65347-53781-01089-16331-37334-22917 tcl slt th3 src

Canonical usage: syntax/join-operator.html

/* IMP: R-24999-30014 */
# EVIDENCE-OF: R-24999-30014 -- syntax diagram join-operator

R-54382-61764-64572-42659-14322-10734-05041-01494 tcl slt th3 src

Canonical usage: syntax/ordering-term.html

/* IMP: R-54382-61764 */
# EVIDENCE-OF: R-54382-61764 -- syntax diagram ordering-term

R-35473-09323-51070-49381-06532-56561-01297-03559 tcl slt th3 src

Canonical usage: syntax/result-column.html

/* IMP: R-35473-09323 */
# EVIDENCE-OF: R-35473-09323 -- syntax diagram result-column

R-45000-47812-33792-18048-40996-50849-16831-13312 tcl slt th3 src

Canonical usage: syntax/table-or-subquery.html

/* IMP: R-45000-47812 */
# EVIDENCE-OF: R-45000-47812 -- syntax diagram table-or-subquery

R-27503-48393-50904-62536-02444-59493-56551-12481 tcl slt th3 src

Canonical usage: syntax/type-name.html

/* IMP: R-27503-48393 */
# EVIDENCE-OF: R-27503-48393 -- syntax diagram type-name

R-16446-38486-52659-45236-06548-25582-51186-33834 tcl slt th3 src

Canonical usage: syntax/signed-number.html

/* IMP: R-16446-38486 */
# EVIDENCE-OF: R-16446-38486 -- syntax diagram signed-number

R-15514-65163-22430-27593-57969-12482-41561-35461 tcl slt th3 src

SQLite understands the following binary operators, in order from highest to lowest precedence:

||
*    /    %
+    -
<<   >>   &    |
<    <=   >    >=
=    ==   !=   <>   IS   IS NOT   IN   LIKE   GLOB   MATCH   REGEXP
AND   
OR

tcl/e_expr.test:87

/* IMP: R-15514-65163 */
# EVIDENCE-OF: R-15514-65163 SQLite understands the following binary
# operators, in order from highest to lowest precedence: || * / % + -
# << >> & | < <= > >= = == != <> IS IS
# NOT IN LIKE GLOB MATCH REGEXP AND OR

R-13958-53419-49614-06664-47934-29028-23296-04281 tcl slt th3 src

Supported unary prefix operators are these:

-    +    ~    NOT

tcl/e_expr.test:183

/* IMP: R-13958-53419 */
# EVIDENCE-OF: R-13958-53419 Supported unary prefix operators are these:
# - + ~ NOT

R-59577-33471-39346-45414-34609-60012-12077-11853 tcl slt th3 src

The COLLATE operator is a unary postfix operator that assigns a collating sequence to an expression.

tcl/e_expr.test:366

/* IMP: R-59577-33471 */
# EVIDENCE-OF: R-59577-33471 The COLLATE operator is a unary postfix
# operator that assigns a collating sequence to an expression.

R-36231-30731-18114-11584-03409-00455-24711-59821 tcl slt th3 src

The COLLATE operator has a higher precedence (binds more tightly) than any binary operator and any unary prefix operator except "~".

tcl/e_expr.test:369

/* IMP: R-36231-30731 */
# EVIDENCE-OF: R-36231-30731 The COLLATE operator has a higher
# precedence (binds more tightly) than any binary operator and any unary
# prefix operator except "~".

R-58731-25439-21347-45819-04127-12492-10479-51386 tcl slt th3 src

The collating sequence set by the COLLATE operator overrides the collating sequence determined by the COLLATE clause in a table column definition.

tcl/e_expr.test:404

/* IMP: R-58731-25439 */
# EVIDENCE-OF: R-58731-25439 The collating sequence set by the COLLATE
# operator overrides the collating sequence determined by the COLLATE
# clause in a table column definition.

R-53670-03373-29503-41803-42706-56849-33971-45159 tcl slt th3 src

The unary operator + is a no-op.

tcl/e_expr.test:194

/* IMP: R-53670-03373 */
# EVIDENCE-OF: R-53670-03373 The unary operator + is a no-op.

R-19480-30968-40912-48323-17771-07927-20882-34034 tcl slt th3 src

It can be applied to strings, numbers, blobs or NULL and it always returns a result with the same value as the operand.

tcl/e_expr.test:196

/* IMP: R-19480-30968 */
# EVIDENCE-OF: R-19480-30968 It can be applied to strings, numbers,
# blobs or NULL and it always returns a result with the same value as
# the operand.

R-03679-60639-59233-10900-40024-64867-37353-18498 tcl slt th3 src

Equals can be either = or ==.

tcl/e_expr.test:216

/* IMP: R-03679-60639 */
# EVIDENCE-OF: R-03679-60639 Equals can be either = or ==.

R-30082-38996-55894-31210-19025-03289-36793-27218 tcl slt th3 src

The non-equals operator can be either != or <>.

tcl/e_expr.test:218

/* IMP: R-30082-38996 */
# EVIDENCE-OF: R-30082-38996 The non-equals operator can be either != or
# <>.

R-44409-62641-17041-24104-11614-63008-35007-15423 tcl slt th3 src

The || operator is "concatenate" - it joins together the two strings of its operands.

tcl/e_expr.test:241

/* IMP: R-44409-62641 */
# EVIDENCE-OF: R-44409-62641 The || operator is "concatenate" - it joins
# together the two strings of its operands.

R-08914-63790-06643-47289-00974-31735-19483-54546 tcl slt th3 src

The operator % outputs the value of its left operand modulo its right operand.

tcl/e_expr.test:257

/* IMP: R-08914-63790 */
# EVIDENCE-OF: R-08914-63790 The operator % outputs the value of its
# left operand modulo its right operand.

R-20665-17792-14135-29123-51100-08894-37624-05824 tcl slt th3 src

The result of any binary operator is either a numeric value or NULL, except for the || concatenation operator which always evaluates to either NULL or a text value.

tcl/e_expr.test:270

/* IMP: R-20665-17792 */
# EVIDENCE-OF: R-20665-17792 The result of any binary operator is either
# a numeric value or NULL, except for the || concatenation operator
# which always evaluates to either NULL or a text value.

R-24731-45773-21654-50701-01955-60961-16210-17736 tcl slt th3 src

The IS and IS NOT operators work like = and != except when one or both of the operands are NULL.

tcl/e_expr.test:299

/* IMP: R-24731-45773 */
# EVIDENCE-OF: R-24731-45773 The IS and IS NOT operators work like = and
# != except when one or both of the operands are NULL.

R-06325-15315-47203-37013-07627-21557-12001-05874 tcl slt th3 src

In this case, if both operands are NULL, then the IS operator evaluates to 1 (true) and the IS NOT operator evaluates to 0 (false).

tcl/e_expr.test:302

/* IMP: R-06325-15315 */
# EVIDENCE-OF: R-06325-15315 In this case, if both operands are NULL,
# then the IS operator evaluates to 1 (true) and the IS NOT operator
# evaluates to 0 (false).

R-19812-36779-26037-25587-55568-01966-51571-26935 tcl slt th3 src

If one operand is NULL and the other is not, then the IS operator evaluates to 0 (false) and the IS NOT operator is 1 (true).

tcl/e_expr.test:306

/* IMP: R-19812-36779 */
# EVIDENCE-OF: R-19812-36779 If one operand is NULL and the other is
# not, then the IS operator evaluates to 0 (false) and the IS NOT
# operator is 1 (true).

R-61975-13410-23961-36433-37989-49063-55179-53550 tcl slt th3 src

It is not possible for an IS or IS NOT expression to evaluate to NULL.

tcl/e_expr.test:310

/* IMP: R-61975-13410 */
# EVIDENCE-OF: R-61975-13410 It is not possible for an IS or IS NOT
# expression to evaluate to NULL.

R-38759-38789-04186-61984-59919-00444-32947-07826 tcl slt th3 src

Operators IS and IS NOT have the same precedence as =.

tcl/e_expr.test:92

/* IMP: R-38759-38789 */
# EVIDENCE-OF: R-38759-38789 Operators IS and IS NOT have the same
# precedence as =.

R-31536-32008-60945-18932-27030-19997-64437-42960 tcl slt th3 src

Literal values may be integers, floating point numbers, strings, BLOBs, or NULLs.

tcl/e_expr.test:422

/* IMP: R-31536-32008 */
# EVIDENCE-OF: R-31536-32008 Literal values may be integers, floating
# point numbers, strings, BLOBs, or NULLs.

R-31352-57778-38921-49124-24515-22151-61743-47337 tcl slt th3 src

Canonical usage: syntax/numeric-literal.html

/* IMP: R-31352-57778 */
# EVIDENCE-OF: R-31352-57778 -- syntax diagram numeric-literal

R-59165-19659-62655-08442-22877-21520-01156-02106 tcl slt th3 src

If a numeric literal has a decimal point or an exponentiation clause or if its magnitude is less than -9223372036854775808 or greater than 9223372036854775807, then it is a floating point literal. Otherwise is it is an integer literal.

th3/req1/expr01.test:11

/* IMP: R-59165-19659 */
# EVIDENCE-OF: R-59165-19659 If a numeric literal has a decimal point or
# an exponentiation clause or if its magnitude is less than
# -9223372036854775808 or greater than 9223372036854775807, then it is a
# floating point literal. Otherwise is it is an integer literal.

R-31163-29022-10663-19494-01661-06524-11639-30452 tcl slt th3 src

The "E" character that begins the exponentiation clause of a floating point literal can be either upper or lower case.

th3/req1/expr01.test:36

/* IMP: R-31163-29022 */
# EVIDENCE-OF: R-31163-29022 The "E" character that begins the
# exponentiation clause of a floating point literal can be either upper
# or lower case.

R-15867-30493-08974-44645-42836-18647-48672-50550 tcl slt th3 src

The "." character is always used as the decimal point even if the locale setting specifies "," for this role - the use of "," for the decimal point would result in syntactic ambiguity.

th3/req1/expr01.test:44

/* IMP: R-15867-30493 */
# EVIDENCE-OF: R-15867-30493 The "." character is always used as the
# decimal point even if the locale setting specifies "," for this role -
# the use of "," for the decimal point would result in syntactic
# ambiguity.

R-50109-18895-48987-07545-37480-53059-10212-16515 tcl slt th3 src

Hexadecimal integer literals follow the C-language notation of "0x" or "0X" followed by hexadecimal digits.

th3/req1/expr01.test:53

/* IMP: R-50109-18895 */
# EVIDENCE-OF: R-50109-18895 Hexadecimal integer literals follow the
# C-language notation of "0x" or "0X" followed by hexadecimal digits.

R-12628-51384-03932-15263-35503-59702-54474-35956 tcl slt th3 src

For example, 0x1234 means the same as 4660 and 0x8000000000000000 means the same as -9223372036854775808.

th3/req1/expr01.test:56

/* IMP: R-12628-51384 */
# EVIDENCE-OF: R-12628-51384 For example, 0x1234 means the same as 4660
# and 0x8000000000000000 means the same as -9223372036854775808.

R-42106-50385-56441-15914-62934-29085-54052-00189 tcl slt th3 src

Hexadecimal integer literals are interpreted as 64-bit two's-complement integers and are thus limited to sixteen significant digits of precision.

th3/req1/expr01.test:67

/* IMP: R-42106-50385 */
# EVIDENCE-OF: R-42106-50385 Hexadecimal integer literals are
# interpreted as 64-bit two's-complement integers and are thus limited
# to sixteen significant digits of precision.

R-21873-57098-57834-11008-20676-08257-29659-57534 tcl slt th3 src

For backwards compatibility, the "0x" hexadecimal integer notation is only understood by the SQL language parser, not by the type conversions routines.

th3/req1/expr01.test:81

/* IMP: R-21873-57098 */
# EVIDENCE-OF: R-21873-57098 For backwards compatibility, the "0x"
# hexadecimal integer notation is only understood by the SQL language
# parser, not by the type conversions routines.

R-47301-17448-04122-36354-45464-07871-26388-12045 tcl slt th3 src

String variables that contain text formatted like hexadecimal integers are not interpreted as hexadecimal integers when coercing the string value into an integer due to a CAST expression or for a column affinity transformation or prior to performing a numeric operation or for any other run-time conversions.

th3/req1/expr01.test:85

/* IMP: R-47301-17448 */
# EVIDENCE-OF: R-47301-17448 String variables that contain text
# formatted like hexadecimal integers are not interpreted as hexadecimal
# integers when coercing the string value into an integer due to a CAST
# expression or for a column affinity transformation or prior to
# performing a numeric operation or for any other run-time conversions.

R-43895-16198-12902-10668-43383-15391-26544-03216 tcl slt th3 src

When coercing a string value in the format of a hexadecimal integer into an integer value, the conversion process stops when the 'x' character is seen so the resulting integer value is always zero.

th3/req1/expr01.test:91

/* IMP: R-43895-16198 */
# EVIDENCE-OF: R-43895-16198 When coercing a string value in the format
# of a hexadecimal integer into an integer value, the conversion process
# stops when the 'x' character is seen so the resulting integer value is
# always zero.

R-05658-50861-03980-59142-22738-32773-09138-30302 tcl slt th3 src

SQLite only understands the hexadecimal integer notation when it appears in the SQL statement text, not when it appears as part of the content of the database.

th3/req1/expr01.test:96

/* IMP: R-05658-50861 */
# EVIDENCE-OF: R-05658-50861 SQLite only understands the hexadecimal
# integer notation when it appears in the SQL statement text, not when
# it appears as part of the content of the database.

R-35229-17830-32159-37744-59002-46141-27438-26089 tcl slt th3 src

A string constant is formed by enclosing the string in single quotes (').

tcl/e_expr.test:438

/* IMP: R-35229-17830 */
# EVIDENCE-OF: R-35229-17830 A string constant is formed by enclosing
# the string in single quotes (').

R-07100-06606-15404-00202-26903-38022-07639-13720 tcl slt th3 src

A single quote within the string can be encoded by putting two single quotes in a row - as in Pascal.

tcl/e_expr.test:441

/* IMP: R-07100-06606 */
# EVIDENCE-OF: R-07100-06606 A single quote within the string can be
# encoded by putting two single quotes in a row - as in Pascal.

R-09593-03321-24060-42412-44512-07305-25128-61318 tcl slt th3 src

BLOB literals are string literals containing hexadecimal data and preceded by a single "x" or "X" character.

tcl/e_expr.test:449

/* IMP: R-09593-03321 */
# EVIDENCE-OF: R-09593-03321 BLOB literals are string literals
# containing hexadecimal data and preceded by a single "x" or "X"
# character.

R-19836-11244-52903-63249-46309-23850-25183-00208 tcl slt th3 src

Example: X'53514C697465'

tcl/e_expr.test:453

/* IMP: R-19836-11244 */
# EVIDENCE-OF: R-19836-11244 Example: X'53514C697465'

R-23914-51476-03843-05689-25158-40099-03729-02958 tcl slt th3 src

A literal value can also be the token "NULL".

tcl/e_expr.test:461

/* IMP: R-23914-51476 */
# EVIDENCE-OF: R-23914-51476 A literal value can also be the token
# "NULL".

R-33509-39458-36310-35502-14516-21374-43920-49454 tcl slt th3 src

A question mark followed by a number NNN holds a spot for the NNN-th parameter. NNN must be between 1 and SQLITE_MAX_VARIABLE_NUMBER.

tcl/e_expr.test:492

/* IMP: R-33509-39458 */
# EVIDENCE-OF: R-33509-39458 A question mark followed by a number NNN
# holds a spot for the NNN-th parameter. NNN must be between 1 and
# SQLITE_MAX_VARIABLE_NUMBER.

R-33670-36097-38044-00457-34720-22769-46022-27724 tcl slt th3 src

A question mark that is not followed by a number creates a parameter with a number one greater than the largest parameter number already assigned.

tcl/e_expr.test:519

/* IMP: R-33670-36097 */
# EVIDENCE-OF: R-33670-36097 A question mark that is not followed by a
# number creates a parameter with a number one greater than the largest
# parameter number already assigned.

R-42938-07030-34028-51732-04227-55156-04511-38808 tcl slt th3 src

If this means the parameter number is greater than SQLITE_MAX_VARIABLE_NUMBER, it is an error.

tcl/e_expr.test:523

/* IMP: R-42938-07030 */
# EVIDENCE-OF: R-42938-07030 If this means the parameter number is
# greater than SQLITE_MAX_VARIABLE_NUMBER, it is an error.

R-11620-22743-59737-64939-21707-40674-29550-48097 tcl slt th3 src

A colon followed by an identifier name holds a spot for a named parameter with the name :AAAA.

tcl/e_expr.test:544

/* IMP: R-11620-22743 */
# EVIDENCE-OF: R-11620-22743 A colon followed by an identifier name
# holds a spot for a named parameter with the name :AAAA.

R-11370-04520-26477-32393-15829-52644-05616-39032 tcl slt th3 src

Named parameters are also numbered. The number assigned is one greater than the largest parameter number already assigned.

tcl/e_expr.test:596

/* IMP: R-11370-04520 */
# EVIDENCE-OF: R-11370-04520 Named parameters are also numbered. The
# number assigned is one greater than the largest parameter number
# already assigned.

R-42620-22184-27875-60566-02937-27650-15183-08626 tcl slt th3 src

If this means the parameter would be assigned a number greater than SQLITE_MAX_VARIABLE_NUMBER, it is an error.

tcl/e_expr.test:600

/* IMP: R-42620-22184 */
# EVIDENCE-OF: R-42620-22184 If this means the parameter would be
# assigned a number greater than SQLITE_MAX_VARIABLE_NUMBER, it is an
# error.

R-49783-61279-16242-54630-23858-13201-42746-50539 tcl slt th3 src

An "at" sign works exactly like a colon, except that the name of the parameter created is @AAAA.

tcl/e_expr.test:560

/* IMP: R-49783-61279 */
# EVIDENCE-OF: R-49783-61279 An "at" sign works exactly like a colon,
# except that the name of the parameter created is @AAAA.

R-62610-51329-57761-33466-25437-21860-03475-27712 tcl slt th3 src

A dollar-sign followed by an identifier name also holds a spot for a named parameter with the name $AAAA.

tcl/e_expr.test:572

/* IMP: R-62610-51329 */
# EVIDENCE-OF: R-62610-51329 A dollar-sign followed by an identifier
# name also holds a spot for a named parameter with the name $AAAA.

R-55025-21042-57260-24001-55816-18376-64535-50045 tcl slt th3 src

The identifier name in this case can include one or more occurrences of "::" and a suffix enclosed in "(...)" containing any text at all.

tcl/e_expr.test:575

/* IMP: R-55025-21042 */
# EVIDENCE-OF: R-55025-21042 The identifier name in this case can
# include one or more occurrences of "::" and a suffix enclosed in
# "(...)" containing any text at all.

R-14068-49671-08903-14280-45288-40590-58798-59213 tcl slt th3 src

Parameters that are not assigned values using sqlite3_bind() are treated as NULL.

tcl/e_expr.test:617

/* IMP: R-14068-49671 */
# EVIDENCE-OF: R-14068-49671 Parameters that are not assigned values
# using sqlite3_bind() are treated as NULL.

R-38091-32352-01038-12567-23855-46288-57631-62410 tcl slt th3 src

The maximum parameter number is set at compile-time by the SQLITE_MAX_VARIABLE_NUMBER macro.

src/main.c:2414

/* IMP: R-38091-32352 */
# EVIDENCE-OF: R-38091-32352 The maximum parameter number is set at
# compile-time by the SQLITE_MAX_VARIABLE_NUMBER macro.

R-47512-27714-00574-29870-48560-40440-32292-60340 tcl slt th3 src

An individual database connection D can reduce its maximum parameter number below the compile-time maximum using the sqlite3_limit(D, SQLITE_LIMIT_VARIABLE_NUMBER,...) interface.

th3/req1/bind01.test:129

/* IMP: R-47512-27714 */
# EVIDENCE-OF: R-47512-27714 An individual database connection D can
# reduce its maximum parameter number below the compile-time maximum
# using the sqlite3_limit(D, SQLITE_LIMIT_VARIABLE_NUMBER,...)
# interface.

R-16584-60189-60940-01835-35282-37415-55139-16536 tcl slt th3 src

The LIKE operator does a pattern matching comparison.

tcl/e_expr.test:906

/* IMP: R-16584-60189 */
# EVIDENCE-OF: R-16584-60189 The LIKE operator does a pattern matching
# comparison.

R-11295-04657-09653-04480-53801-04231-56338-07604 tcl slt th3 src

The operand to the right of the LIKE operator contains the pattern and the left hand operand contains the string to match against the pattern.

tcl/e_expr.test:909

/* IMP: R-11295-04657 */
# EVIDENCE-OF: R-11295-04657 The operand to the right of the LIKE
# operator contains the pattern and the left hand operand contains the
# string to match against the pattern.

R-55406-38524-31149-09087-45874-46813-10331-17259 tcl slt th3 src

A percent symbol ("%") in the LIKE pattern matches any sequence of zero or more characters in the string.

tcl/e_expr.test:916

/* IMP: R-55406-38524 */
# EVIDENCE-OF: R-55406-38524 A percent symbol ("%") in the LIKE pattern
# matches any sequence of zero or more characters in the string.

R-30433-25443-23879-51033-37593-48703-34224-12115 tcl slt th3 src

An underscore ("_") in the LIKE pattern matches any single character in the string.

tcl/e_expr.test:923

/* IMP: R-30433-25443 */
# EVIDENCE-OF: R-30433-25443 An underscore ("_") in the LIKE pattern
# matches any single character in the string.

R-59007-20454-04815-57542-48714-11187-47465-31544 tcl slt th3 src

Any other character matches itself or its lower/upper case equivalent (i.e. case-insensitive matching).

tcl/e_expr.test:930

/* IMP: R-59007-20454 */
# EVIDENCE-OF: R-59007-20454 Any other character matches itself or its
# lower/upper case equivalent (i.e. case-insensitive matching).

R-23648-58527-04335-61943-03061-32754-63941-35147 tcl slt th3 src

SQLite only understands upper/lower case for ASCII characters by default.

tcl/e_expr.test:937

/* IMP: R-23648-58527 */
# EVIDENCE-OF: R-23648-58527 SQLite only understands upper/lower case
# for ASCII characters by default.

R-04532-11527-60293-16788-37808-59040-51319-08926 tcl slt th3 src

The LIKE operator is case sensitive by default for unicode characters that are beyond the ASCII range.

tcl/e_expr.test:940

/* IMP: R-04532-11527 */
# EVIDENCE-OF: R-04532-11527 The LIKE operator is case sensitive by
# default for unicode characters that are beyond the ASCII range.

R-44381-11669-25586-00441-33187-20695-56764-33989 tcl slt th3 src

the expression 'a' LIKE 'A' is TRUE but 'æ' LIKE 'Æ' is FALSE.

tcl/e_expr.test:943

/* IMP: R-44381-11669 */
# EVIDENCE-OF: R-44381-11669 the expression
# 'a'&nbsp;LIKE&nbsp;'A' is TRUE but
# '&aelig;'&nbsp;LIKE&nbsp;'&AElig;' is FALSE.

R-56683-13731-54307-64156-42285-19581-37676-29217 tcl slt th3 src

If the optional ESCAPE clause is present, then the expression following the ESCAPE keyword must evaluate to a string consisting of a single character.

tcl/e_expr.test:956

/* IMP: R-56683-13731 */
# EVIDENCE-OF: R-56683-13731 If the optional ESCAPE clause is present,
# then the expression following the ESCAPE keyword must evaluate to a
# string consisting of a single character.

R-02045-23762-08268-15190-44661-50351-03152-06188 tcl slt th3 src

This character may be used in the LIKE pattern to include literal percent or underscore characters.

tcl/e_expr.test:969

/* IMP: R-02045-23762 */
# EVIDENCE-OF: R-02045-23762 This character may be used in the LIKE
# pattern to include literal percent or underscore characters.

R-13345-31830-42625-35192-25815-10226-10074-63536 tcl slt th3 src

The escape character followed by a percent symbol (%), underscore (_), or a second instance of the escape character itself matches a literal percent symbol, underscore, or a single escape character, respectively.

tcl/e_expr.test:972

/* IMP: R-13345-31830 */
# EVIDENCE-OF: R-13345-31830 The escape character followed by a percent
# symbol (%), underscore (_), or a second instance of the escape
# character itself matches a literal percent symbol, underscore, or a
# single escape character, respectively.

R-51359-17496-64791-11531-01433-14001-31199-61206 tcl slt th3 src

The infix LIKE operator is implemented by calling the application-defined SQL functions like(Y,X) or like(Y,X,Z).

tcl/e_expr.test:994

/* IMP: R-51359-17496 */
# EVIDENCE-OF: R-51359-17496 The infix LIKE operator is implemented by
# calling the application-defined SQL functions like(Y,X) or
# like(Y,X,Z).

R-22868-25880-64801-36236-02118-32586-25357-26503 tcl slt th3 src

The LIKE operator can be made case sensitive using the case_sensitive_like pragma.

tcl/e_expr.test:1012

/* IMP: R-22868-25880 */
# EVIDENCE-OF: R-22868-25880 The LIKE operator can be made case
# sensitive using the case_sensitive_like pragma.

R-52087-12043-18539-27674-65294-02537-52169-03316 tcl slt th3 src

The GLOB operator is similar to LIKE but uses the Unix file globbing syntax for its wildcards.

tcl/e_expr.test:1023

/* IMP: R-52087-12043 */
# EVIDENCE-OF: R-52087-12043 The GLOB operator is similar to LIKE but
# uses the Unix file globbing syntax for its wildcards.

R-09813-17279-59166-04895-48075-17845-31813-35638 tcl slt th3 src

Also, GLOB is case sensitive, unlike LIKE.

tcl/e_expr.test:1026

/* IMP: R-09813-17279 */
# EVIDENCE-OF: R-09813-17279 Also, GLOB is case sensitive, unlike LIKE.

R-39616-20555-02533-15918-45822-50476-08959-13235 tcl slt th3 src

Both GLOB and LIKE may be preceded by the NOT keyword to invert the sense of the test.

tcl/e_expr.test:1037

/* IMP: R-39616-20555 */
# EVIDENCE-OF: R-39616-20555 Both GLOB and LIKE may be preceded by the
# NOT keyword to invert the sense of the test.

R-39414-35489-25303-10592-22636-36530-45454-18784 tcl slt th3 src

The infix GLOB operator is implemented by calling the function glob(Y,X) and can be modified by overriding that function.

tcl/e_expr.test:1053

/* IMP: R-39414-35489 */
# EVIDENCE-OF: R-39414-35489 The infix GLOB operator is implemented by
# calling the function glob(Y,X) and can be modified by overriding that
# function.

R-33693-50180-37638-14993-01835-21324-19267-11438 tcl slt th3 src

The REGEXP operator is a special syntax for the regexp() user function.

tcl/e_expr.test:1084

/* IMP: R-33693-50180 */
# EVIDENCE-OF: R-33693-50180 The REGEXP operator is a special syntax for
# the regexp() user function.

R-41650-20872-58221-16141-48271-22021-38019-62849 tcl slt th3 src

No regexp() user function is defined by default and so use of the REGEXP operator will normally result in an error message.

tcl/e_expr.test:1069

/* IMP: R-41650-20872 */
# EVIDENCE-OF: R-41650-20872 No regexp() user function is defined by
# default and so use of the REGEXP operator will normally result in an
# error message.

R-65524-61849-43329-61953-54493-09890-31645-08912 tcl slt th3 src

If an application-defined SQL function named "regexp" is added at run-time, then the "X REGEXP Y" operator will be implemented as a call to "regexp(Y,X)".

tcl/e_expr.test:1087

/* IMP: R-65524-61849 */
# EVIDENCE-OF: R-65524-61849 If an application-defined SQL function
# named "regexp" is added at run-time, then the "X REGEXP Y" operator
# will be implemented as a call to "regexp(Y,X)".

R-37916-47407-25841-44869-57866-03917-48046-05809 tcl slt th3 src

The MATCH operator is a special syntax for the match() application-defined function.

tcl/e_expr.test:1114

/* IMP: R-37916-47407 */
# EVIDENCE-OF: R-37916-47407 The MATCH operator is a special syntax for
# the match() application-defined function.

R-42037-37826-09680-08362-57128-46753-57920-34709 tcl slt th3 src

The default match() function implementation raises an exception and is not really useful for anything.

tcl/e_expr.test:1104

/* IMP: R-42037-37826 */
# EVIDENCE-OF: R-42037-37826 The default match() function implementation
# raises an exception and is not really useful for anything.

R-06021-09373-60954-10709-09959-52253-36320-11394 tcl slt th3 src

But extensions can override the match() function with more helpful logic.

tcl/e_expr.test:1117

/* IMP: R-06021-09373 */
# EVIDENCE-OF: R-06021-09373 But extensions can override the match()
# function with more helpful logic.

R-40079-54503-52433-22063-65278-03713-13772-01502 tcl slt th3 src

The BETWEEN operator is logically equivalent to a pair of comparisons. "x BETWEEN y AND z" is equivalent to "x>=y AND x<=z" except that with BETWEEN, the x expression is only evaluated once.

tcl/e_expr.test:837   th3/cov1/rowvalue04.test:17

/* IMP: R-40079-54503 */
# EVIDENCE-OF: R-40079-54503 The BETWEEN operator is logically
# equivalent to a pair of comparisons. "x BETWEEN y AND z" is equivalent
# to "x>=y AND x<=z" except that with BETWEEN, the x expression is
# only evaluated once.

R-05155-34454-27271-17967-48575-19068-12269-57153 tcl slt th3 src

The precedence of the BETWEEN operator is the same as the precedence as operators == and != and LIKE and groups left to right.

tcl/e_expr.test:861

/* IMP: R-05155-34454 */
# EVIDENCE-OF: R-05155-34454 The precedence of the BETWEEN operator is
# the same as the precedence as operators == and != and LIKE and groups
# left to right.

R-15199-61389-24637-25675-62796-22180-46893-15939 tcl slt th3 src

There are two basic forms of the CASE expression: those with a base expression and those without.

tcl/e_expr.test:1136

/* IMP: R-15199-61389 */
# EVIDENCE-OF: R-15199-61389 There are two basic forms of the CASE
# expression: those with a base expression and those without.

R-30638-59954-59281-20323-32142-07020-22821-14638 tcl slt th3 src

In a CASE without a base expression, each WHEN expression is evaluated and the result treated as a boolean, starting with the leftmost and continuing to the right.

tcl/e_expr.test:1152

/* IMP: R-30638-59954 */
# EVIDENCE-OF: R-30638-59954 In a CASE without a base expression, each
# WHEN expression is evaluated and the result treated as a boolean,
# starting with the leftmost and continuing to the right.

R-39009-25596-33829-41361-38484-11658-48369-57903 tcl slt th3 src

The result of the CASE expression is the evaluation of the THEN expression that corresponds to the first WHEN expression that evaluates to true.

tcl/e_expr.test:1174

/* IMP: R-39009-25596 */
# EVIDENCE-OF: R-39009-25596 The result of the CASE expression is the
# evaluation of the THEN expression that corresponds to the first WHEN
# expression that evaluates to true.

R-24227-04807-65013-09510-28047-53461-17252-27305 tcl slt th3 src

Or, if none of the WHEN expressions evaluate to true, the result of evaluating the ELSE expression, if any.

tcl/e_expr.test:1203

/* IMP: R-24227-04807 */
# EVIDENCE-OF: R-24227-04807 Or, if none of the WHEN expressions
# evaluate to true, the result of evaluating the ELSE expression, if
# any.

R-14168-07579-40145-07578-27946-11279-56601-46509 tcl slt th3 src

If there is no ELSE expression and none of the WHEN expressions are true, then the overall result is NULL.

tcl/e_expr.test:1216

/* IMP: R-14168-07579 */
# EVIDENCE-OF: R-14168-07579 If there is no ELSE expression and none of
# the WHEN expressions are true, then the overall result is NULL.

R-13943-13592-05756-02149-18071-59821-47409-19193 tcl slt th3 src

A NULL result is considered untrue when evaluating WHEN terms.

tcl/e_expr.test:1228

/* IMP: R-13943-13592 */
# EVIDENCE-OF: R-13943-13592 A NULL result is considered untrue when
# evaluating WHEN terms.

R-38620-19499-44951-35069-39820-53253-57753-11041 tcl slt th3 src

In a CASE with a base expression, the base expression is evaluated just once and the result is compared against the evaluation of each WHEN expression from left to right.

tcl/e_expr.test:1238

/* IMP: R-38620-19499 */
# EVIDENCE-OF: R-38620-19499 In a CASE with a base expression, the base
# expression is evaluated just once and the result is compared against
# the evaluation of each WHEN expression from left to right.

R-07667-49537-57124-54989-59227-41131-33160-03537 tcl slt th3 src

The result of the CASE expression is the evaluation of the THEN expression that corresponds to the first WHEN expression for which the comparison is true.

tcl/e_expr.test:1253

/* IMP: R-07667-49537 */
# EVIDENCE-OF: R-07667-49537 The result of the CASE expression is the
# evaluation of the THEN expression that corresponds to the first WHEN
# expression for which the comparison is true.

R-47543-32145-59149-48631-62108-17148-32947-37500 tcl slt th3 src

Or, if none of the WHEN expressions evaluate to a value equal to the base expression, the result of evaluating the ELSE expression, if any.

tcl/e_expr.test:1264

/* IMP: R-47543-32145 */
# EVIDENCE-OF: R-47543-32145 Or, if none of the WHEN expressions
# evaluate to a value equal to the base expression, the result of
# evaluating the ELSE expression, if any.

R-54721-48557-63407-03546-07641-33336-53635-34168 tcl slt th3 src

If there is no ELSE expression and none of the WHEN expressions produce a result equal to the base expression, the overall result is NULL.

tcl/e_expr.test:1272

/* IMP: R-54721-48557 */
# EVIDENCE-OF: R-54721-48557 If there is no ELSE expression and none of
# the WHEN expressions produce a result equal to the base expression,
# the overall result is NULL.

R-11479-62774-14648-38644-49524-53539-14021-51295 tcl slt th3 src

When comparing a base expression against a WHEN expression, the same collating sequence, affinity, and NULL-handling rules apply as if the base expression and WHEN expression are respectively the left- and right-hand operands of an = operator.

tcl/e_expr.test:1285

/* IMP: R-11479-62774 */
# EVIDENCE-OF: R-11479-62774 When comparing a base expression against a
# WHEN expression, the same collating sequence, affinity, and
# NULL-handling rules apply as if the base expression and WHEN
# expression are respectively the left- and right-hand operands of an =
# operator.

R-37304-39405-25413-14317-50314-46541-26352-18136 tcl slt th3 src

If the base expression is NULL then the result of the CASE is always the result of evaluating the ELSE expression if it exists, or NULL if it does not.

tcl/e_expr.test:1337

/* IMP: R-37304-39405 */
# EVIDENCE-OF: R-37304-39405 If the base expression is NULL then the
# result of the CASE is always the result of evaluating the ELSE
# expression if it exists, or NULL if it does not.

R-56280-17369-11717-14525-09241-09664-14556-20621 tcl slt th3 src

Both forms of the CASE expression use lazy, or short-circuit, evaluation.

tcl/e_expr.test:1348

/* IMP: R-56280-17369 */
# EVIDENCE-OF: R-56280-17369 Both forms of the CASE expression use lazy,
# or short-circuit, evaluation.

R-34773-62253-14389-56183-06695-27653-47306-47953 tcl slt th3 src

The only difference between the following two CASE expressions is that the x expression is evaluated exactly once in the first example but might be evaluated multiple times in the second:

tcl/e_expr.test:1369

/* IMP: R-34773-62253 */
# EVIDENCE-OF: R-34773-62253 The only difference between the following
# two CASE expressions is that the x expression is evaluated exactly
# once in the first example but might be evaluated multiple times in the
# second: CASE x WHEN w1 THEN r1 WHEN w2 THEN r2 ELSE r3 END CASE WHEN
# x=w1 THEN r1 WHEN x=w2 THEN r2 ELSE r3 END

R-15810-56691-30500-50989-63977-00699-03712-43349 tcl slt th3 src

The IN and NOT IN operators take an expression on the left and a list of values or a subquery on the right.

th3/cov1/in01.test:10

/* IMP: R-15810-56691 */
# EVIDENCE-OF: R-15810-56691 The IN and NOT IN operators take an
# expression on the left and a list of values or a subquery on the
# right.

R-01921-64245-04718-64212-38644-45300-05525-61121 tcl slt th3 src

When the right operand of an IN or NOT IN operator is a subquery, the subquery must have the same number of columns as there are columns in the row value of the left operand.

th3/cov1/rowvalue06.test:49

/* IMP: R-01921-64245 */
# EVIDENCE-OF: R-01921-64245 When the right operand of an IN or NOT IN
# operator is a subquery, the subquery must have the same number of
# columns as there are columns in the row value of the left operand.

R-35033-20570-55146-33091-43588-36289-00669-04528 tcl slt th3 src

The subquery on the right of an IN or NOT IN operator must be a scalar subquery if the left expression is not a row value expression.

slt/in2.test:292

/* IMP: R-35033-20570 */
# EVIDENCE-OF: R-35033-20570 The subquery on the right of an IN or NOT
# IN operator must be a scalar subquery if the left expression is not a
# row value expression.

R-05985-29284-11131-56196-04541-34001-38610-39560 tcl slt th3 src

If the right operand of an IN or NOT IN operator is a list of values, each of those values must be scalars and the left expression must also be a scalar.

th3/cov1/rowvalue06.test:78

/* IMP: R-05985-29284 */
# EVIDENCE-OF: R-05985-29284 If the right operand of an IN or NOT IN
# operator is a list of values, each of those values must be scalars and
# the left expression must also be a scalar.

R-29609-10377-53436-28646-00070-22457-04173-55911 tcl slt th3 src

The right-hand side of an IN or NOT IN operator can be a table name or table-valued function name in which case the right-hand side is understood to be subquery of the form "(SELECT * FROM name)".

th3/cov1/in01.test:161

/* IMP: R-29609-10377 */
# EVIDENCE-OF: R-29609-10377 The right-hand side of an IN or NOT IN
# operator can be a table name or table-valued function name in which
# case the right-hand side is understood to be subquery of the form
# "(SELECT * FROM name)".

R-52275-55503-36173-27620-56866-61017-01277-04274 tcl slt th3 src

When the right operand is an empty set, the result of IN is false and the result of NOT IN is true, regardless of the left operand and even if the left operand is NULL.

slt/in1.test:11   slt/in2.test:2   tcl/tkt-80e031a00f.test:23

/* IMP: R-52275-55503 */
# EVIDENCE-OF: R-52275-55503 When the right operand is an empty set, the
# result of IN is false and the result of NOT IN is true, regardless of
# the left operand and even if the left operand is NULL.

R-50221-42915-63366-22900-20330-11785-03020-07712 tcl slt th3 src

The result of an IN or NOT IN operator is determined by the following matrix:

Left operand
is NULL
Right operand
contains NULL
Right operand
is an empty set
Left operand found
within right operand
Result of
IN operator
Result of
NOT IN operator
no no no no false true
does not matter no yes no false true
no does not matter no yes true false
no yes no no NULL NULL
yes does not matter no does not matter NULL NULL

slt/in1.test:330   slt/in2.test:14   tcl/tkt-80e031a00f.test:79

/* IMP: R-50221-42915 */
# EVIDENCE-OF: R-50221-42915 The result of an IN or NOT IN operator is
# determined by the following matrix: Left operand is NULL Right operand
# contains NULL Right operand is an empty set Left operand found within
# right operand Result of IN operator Result of NOT IN operator no no no
# no false true does not matter no yes no false true no does not matter
# no yes true false no yes no no NULL NULL yes does not matter no does
# not matter NULL NULL

R-13595-45863-41975-17982-37007-43143-15451-31635 tcl slt th3 src

Note that SQLite allows the parenthesized list of scalar values on the right-hand side of an IN or NOT IN operator to be an empty list but most other SQL database database engines and the SQL92 standard require the list to contain at least one element.

slt/in1.test:16   slt/in2.test:7   tcl/tkt-80e031a00f.test:27

/* IMP: R-13595-45863 */
# EVIDENCE-OF: R-13595-45863 Note that SQLite allows the parenthesized
# list of scalar values on the right-hand side of an IN or NOT IN
# operator to be an empty list but most other SQL database database
# engines and the SQL92 standard require the list to contain at least
# one element.

R-06726-07466-50674-60893-18596-18216-57915-63107 tcl slt th3 src

A column name can be any of the names defined in the CREATE TABLE statement or one of the following special identifiers: "ROWID", "OID", or "_ROWID_".

tcl/e_createtable.test:1658

/* IMP: R-06726-07466 */
# EVIDENCE-OF: R-06726-07466 A column name can be any of the names
# defined in the CREATE TABLE statement or one of the following special
# identifiers: "ROWID", "OID", or "_ROWID_".

R-07387-29430-25270-46585-59144-29340-25578-53451 tcl slt th3 src

The three special identifiers describe the unique integer key (the rowid) associated with every row of every table and so are not available on WITHOUT ROWID tables.

th3/req1/expr02.test:33

/* IMP: R-07387-29430 */
# EVIDENCE-OF: R-07387-29430 The three special identifiers describe the
# unique integer key (the rowid) associated with every row of every
# table and so are not available on WITHOUT ROWID tables.

R-44615-33286-13182-19247-40132-09732-39940-41262 tcl slt th3 src

The special identifiers only refer to the row key if the CREATE TABLE statement does not define a real column with the same name.

tcl/e_createtable.test:1686

/* IMP: R-44615-33286 */
# EVIDENCE-OF: R-44615-33286 The special identifiers only refer to the
# row key if the CREATE TABLE statement does not define a real column
# with the same name.

R-46129-45598-36416-42008-62999-11143-15168-02813 tcl slt th3 src

The rowid can be used anywhere a regular column can be used.

/* IMP: R-46129-45598 */
# EVIDENCE-OF: R-46129-45598 The rowid can be used anywhere a regular
# column can be used.

R-25588-27181-18097-02154-44633-08776-21987-21638 tcl slt th3 src

The EXISTS operator always evaluates to one of the integer values 0 and 1.

tcl/e_expr.test:1715

/* IMP: R-25588-27181 */
# EVIDENCE-OF: R-25588-27181 The EXISTS operator always evaluates to one
# of the integer values 0 and 1.

R-58553-63740-12454-47627-42438-52862-15434-40396 tcl slt th3 src

If executing the SELECT statement specified as the right-hand operand of the EXISTS operator would return one or more rows, then the EXISTS operator evaluates to 1.

tcl/e_expr.test:1723

/* IMP: R-58553-63740 */
# EVIDENCE-OF: R-58553-63740 If executing the SELECT statement specified
# as the right-hand operand of the EXISTS operator would return one or
# more rows, then the EXISTS operator evaluates to 1.

R-19673-40972-58319-61162-14300-46572-05681-35590 tcl slt th3 src

If executing the SELECT would return no rows at all, then the EXISTS operator evaluates to 0.

tcl/e_expr.test:1737

/* IMP: R-19673-40972 */
# EVIDENCE-OF: R-19673-40972 If executing the SELECT would return no
# rows at all, then the EXISTS operator evaluates to 0.

R-35109-49139-58862-12127-06342-61829-38093-58472 tcl slt th3 src

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.

tcl/e_expr.test:1749

/* IMP: R-35109-49139 */
# EVIDENCE-OF: R-35109-49139 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.

R-10645-12439-29307-46302-11314-15082-25631-53469 tcl slt th3 src

In particular, rows containing NULL values are not handled any differently from rows without NULL values.

tcl/e_expr.test:1768

/* IMP: R-10645-12439 */
# EVIDENCE-OF: R-10645-12439 In particular, rows containing NULL values
# are not handled any differently from rows without NULL values.

R-43573-23448-48051-43416-34138-28993-49586-17736 tcl slt th3 src

A SELECT statement enclosed in parentheses is a subquery.

tcl/e_expr.test:1796

/* IMP: R-43573-23448 */
# EVIDENCE-OF: R-43573-23448 A SELECT statement enclosed in parentheses
# is a subquery.

R-56294-03966-08864-53339-51473-44924-63281-58418 tcl slt th3 src

All types of SELECT statement, including aggregate and compound SELECT queries (queries with keywords like UNION or EXCEPT) are allowed as scalar subqueries.

tcl/e_expr.test:1799

/* IMP: R-56294-03966 */
# EVIDENCE-OF: R-56294-03966 All types of SELECT statement, including
# aggregate and compound SELECT queries (queries with keywords like
# UNION or EXCEPT) are allowed as scalar subqueries.

R-18318-14995-07554-10565-41972-64784-37540-10382 tcl slt th3 src

The value of a subquery expression is the first row of the result from the enclosed SELECT statement.

tcl/e_expr.test:1835

/* IMP: R-18318-14995 */
# EVIDENCE-OF: R-18318-14995 The value of a subquery expression is the
# first row of the result from the enclosed SELECT statement.

R-15900-52156-42838-50437-37871-27241-20817-56256 tcl slt th3 src

In other words, an implied "LIMIT 1" is added to the subquery, overriding an explicitly coded LIMIT.

tcl/e_expr.test:1838   th3/req1/expr02.test:11

/* IMP: R-15900-52156 */
# EVIDENCE-OF: R-15900-52156 In other words, an implied "LIMIT 1" is
# added to the subquery, overriding an explicitly coded LIMIT.

R-52325-25449-60499-51336-30088-24450-41754-02274 tcl slt th3 src

The value of a subquery expression is NULL if the enclosed SELECT statement returns no rows.

tcl/e_expr.test:1863

/* IMP: R-52325-25449 */
# EVIDENCE-OF: R-52325-25449 The value of a subquery expression is NULL
# if the enclosed SELECT statement returns no rows.

R-22239-33740-47135-11952-01366-26065-00899-21193 tcl slt th3 src

A subquery that returns two or more columns is a row value subquery and can only be used as the operand of a comparison operator.

tcl/e_expr.test:1816

/* IMP: R-22239-33740 */
# EVIDENCE-OF: R-22239-33740 A subquery that returns two or more columns
# is a row value subquery and can only be used as the operand of a
# comparison operator.

R-25616-08788-18594-15704-08007-00569-12211-26573 tcl slt th3 src

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.

th3/req1/select01.test:43

/* IMP: R-25616-08788 */
# EVIDENCE-OF: R-25616-08788 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.

R-45820-61953-03602-28420-59065-19791-09856-58583 tcl slt th3 src

A correlated subquery is reevaluated each time its result is required.

th3/req1/select01.test:18

/* IMP: R-45820-61953 */
# EVIDENCE-OF: R-45820-61953 A correlated subquery is reevaluated each
# time its result is required.

R-35325-25517-01545-24178-13996-21143-53189-45296 tcl slt th3 src

An uncorrelated subquery is evaluated only once and the result reused as necessary.

th3/req1/select01.test:33

/* IMP: R-35325-25517 */
# EVIDENCE-OF: R-35325-25517 An uncorrelated subquery is evaluated only
# once and the result reused as necessary.

R-20854-17109-31337-20710-58230-10583-22919-16758 tcl slt th3 src

A CAST conversion is similar to the conversion that takes place when a column affinity is applied to a value except that with the CAST operator the conversion always takes place even if the conversion lossy and irreversible, whereas column affinity only changes the data type of a value if the change is lossless and reversible.

tcl/e_expr.test:1413

/* IMP: R-20854-17109 */
# EVIDENCE-OF: R-20854-17109 A CAST conversion is similar to the
# conversion that takes place when a column affinity is applied to a
# value except that with the CAST operator the conversion always takes
# place even if the conversion lossy and irreversible, whereas column
# affinity only changes the data type of a value if the change is
# lossless and reversible.

R-32434-09092-13813-42395-15886-36394-05508-61902 tcl slt th3 src

If the value of expr is NULL, then the result of the CAST expression is also NULL.

tcl/e_expr.test:1432

/* IMP: R-32434-09092 */
# EVIDENCE-OF: R-32434-09092 If the value of expr is NULL, then the
# result of the CAST expression is also NULL.

R-29283-15561-34387-21673-60506-52883-35719-11898 tcl slt th3 src

Otherwise, the storage class of the result is determined by applying the rules for determining column affinity to the type-name.

tcl/e_expr.test:1440

/* IMP: R-29283-15561 */
# EVIDENCE-OF: R-29283-15561 Otherwise, the storage class of the result
# is determined by applying the rules for determining column affinity to
# the type-name.

R-43522-35548-12073-03111-59330-30466-17240-55087 tcl slt th3 src

Casting a value to a type-name with no affinity causes the value to be converted into a BLOB.

tcl/e_expr.test:1447

/* IMP: R-43522-35548 */
# EVIDENCE-OF: R-43522-35548 Casting a value to a type-name with no
# affinity causes the value to be converted into a BLOB.

R-22956-37754-14278-17642-05627-50863-58555-30245 tcl slt th3 src

Casting to a BLOB consists of first casting the value to TEXT in the encoding of the database connection, then interpreting the resulting byte sequence as a BLOB instead of as TEXT.

tcl/e_expr.test:1454

/* IMP: R-22956-37754 */
# EVIDENCE-OF: R-22956-37754 Casting to a BLOB consists of first casting
# the value to TEXT in the encoding of the database connection, then
# interpreting the resulting byte sequence as a BLOB instead of as TEXT.

R-04207-37981-22726-45777-39517-24105-18228-28404 tcl slt th3 src

To cast a BLOB value to TEXT, the sequence of bytes that make up the BLOB is interpreted as text encoded using the database encoding.

tcl/e_expr.test:1480

/* IMP: R-04207-37981 */
# EVIDENCE-OF: R-04207-37981 To cast a BLOB value to TEXT, the sequence
# of bytes that make up the BLOB is interpreted as text encoded using
# the database encoding.

R-22235-47006-02687-15500-56774-48140-19704-63768 tcl slt th3 src

Casting an INTEGER or REAL value into TEXT renders the value as if via sqlite3_snprintf() except that the resulting TEXT uses the encoding of the database connection.

tcl/e_expr.test:1496

/* IMP: R-22235-47006 */
# EVIDENCE-OF: R-22235-47006 Casting an INTEGER or REAL value into TEXT
# renders the value as if via sqlite3_snprintf() except that the
# resulting TEXT uses the encoding of the database connection.

R-26346-36443-14203-01237-59463-02061-43306-07214 tcl slt th3 src

When casting a BLOB value to a REAL, the value is first converted to TEXT.

tcl/e_expr.test:1509

/* IMP: R-26346-36443 */
# EVIDENCE-OF: R-26346-36443 When casting a BLOB value to a REAL, the
# value is first converted to TEXT.

R-54898-34554-42956-11210-21105-01944-03178-39152 tcl slt th3 src

When casting a TEXT value to REAL, the longest possible prefix of the value that can be interpreted as a real number is extracted from the TEXT value and the remainder ignored.

tcl/e_expr.test:1532

/* IMP: R-54898-34554 */
# EVIDENCE-OF: R-54898-34554 When casting a TEXT value to REAL, the
# longest possible prefix of the value that can be interpreted as a real
# number is extracted from the TEXT value and the remainder ignored.

R-11321-47427-17901-35193-41209-48737-39207-23278 tcl slt th3 src

Any leading spaces in the TEXT value are ignored when converging from TEXT to REAL.

tcl/e_expr.test:1541

/* IMP: R-11321-47427 */
# EVIDENCE-OF: R-11321-47427 Any leading spaces in the TEXT value are
# ignored when converging from TEXT to REAL.

R-22662-28218-11402-23235-34288-43676-21619-60718 tcl slt th3 src

If there is no prefix that can be interpreted as a real number, the result of the conversion is 0.0.

tcl/e_expr.test:1549

/* IMP: R-22662-28218 */
# EVIDENCE-OF: R-22662-28218 If there is no prefix that can be
# interpreted as a real number, the result of the conversion is 0.0.

R-21829-14563-51248-28780-63073-47174-17671-25024 tcl slt th3 src

When casting a BLOB value to INTEGER, the value is first converted to TEXT.

tcl/e_expr.test:1556

/* IMP: R-21829-14563 */
# EVIDENCE-OF: R-21829-14563 When casting a BLOB value to INTEGER, the
# value is first converted to TEXT.

R-47612-45842-47349-09557-45633-42955-42013-27541 tcl slt th3 src

When casting a TEXT value to INTEGER, the longest possible prefix of the value that can be interpreted as an integer number is extracted from the TEXT value and the remainder ignored.

tcl/e_expr.test:1584

/* IMP: R-47612-45842 */
# EVIDENCE-OF: R-47612-45842 When casting a TEXT value to INTEGER, the
# longest possible prefix of the value that can be interpreted as an
# integer number is extracted from the TEXT value and the remainder
# ignored.

R-34400-33772-12568-07085-14602-53889-15876-12187 tcl slt th3 src

Any leading spaces in the TEXT value when converting from TEXT to INTEGER are ignored.

tcl/e_expr.test:1594

/* IMP: R-34400-33772 */
# EVIDENCE-OF: R-34400-33772 Any leading spaces in the TEXT value when
# converting from TEXT to INTEGER are ignored.

R-43164-44276-05448-08571-37890-01247-49300-00926 tcl slt th3 src

If there is no prefix that can be interpreted as an integer number, the result of the conversion is 0.

tcl/e_expr.test:1602

/* IMP: R-43164-44276 */
# EVIDENCE-OF: R-43164-44276 If there is no prefix that can be
# interpreted as an integer number, the result of the conversion is 0.

R-08980-53124-31180-17843-61277-57445-45439-15186 tcl slt th3 src

The CAST operator understands decimal integers only — conversion of hexadecimal integers stops at the "x" in the "0x" prefix of the hexadecimal integer string and thus result of the CAST is always zero.

tcl/e_expr.test:1609

/* IMP: R-08980-53124 */
# EVIDENCE-OF: R-08980-53124 The CAST operator understands decimal
# integers only &mdash; conversion of hexadecimal integers stops at
# the "x" in the "0x" prefix of the hexadecimal integer string and thus
# result of the CAST is always zero.

R-02752-50091-50763-13370-06213-52053-61647-05504 tcl slt th3 src

A cast of a REAL value into an INTEGER results in the integer between the REAL value and zero that is closest to the REAL value.

tcl/e_expr.test:1616

/* IMP: R-02752-50091 */
# EVIDENCE-OF: R-02752-50091 A cast of a REAL value into an INTEGER
# results in the integer between the REAL value and zero that is closest
# to the REAL value.

R-51517-40824-40012-37469-09201-20241-42443-20040 tcl slt th3 src

If a REAL is greater than the greatest possible signed integer (+9223372036854775807) then the result is the greatest possible signed integer and if the REAL is less than the least possible signed integer (-9223372036854775808) then the result is the least possible signed integer.

tcl/e_expr.test:1625

/* IMP: R-51517-40824 */
# EVIDENCE-OF: R-51517-40824 If a REAL is greater than the greatest
# possible signed integer (+9223372036854775807) then the result is the
# greatest possible signed integer and if the REAL is less than the
# least possible signed integer (-9223372036854775808) then the result
# is the least possible signed integer.

R-09295-61337-32073-06786-13373-31465-59006-42307 tcl slt th3 src

Casting a TEXT or BLOB value into NUMERIC first does a forced conversion into REAL but then further converts the result into INTEGER if and only if the conversion from REAL to INTEGER is lossless and reversible.

tcl/e_expr.test:1641

/* IMP: R-09295-61337 */
# EVIDENCE-OF: R-09295-61337 Casting a TEXT or BLOB value into NUMERIC
# first does a forced conversion into REAL but then further converts the
# result into INTEGER if and only if the conversion from REAL to INTEGER
# is lossless and reversible.

R-30347-18702-41681-51017-11561-03801-56644-21815 tcl slt th3 src

Casting a REAL or INTEGER value to NUMERIC is a no-op, even if a real value could be losslessly converted to an integer.

tcl/e_expr.test:1652

/* IMP: R-30347-18702 */
# EVIDENCE-OF: R-30347-18702 Casting a REAL or INTEGER value to NUMERIC
# is a no-op, even if a real value could be losslessly converted to an
# integer.

R-64550-29191-54086-24811-00443-47986-21003-27772 tcl slt th3 src

Note that the result from casting any non-BLOB value into a BLOB and the result from casting any BLOB value into a non-BLOB value may be different depending on whether the database encoding is UTF-8, UTF-16be, or UTF-16le.

tcl/e_expr.test:1666

/* IMP: R-64550-29191 */
# EVIDENCE-OF: R-64550-29191 Note that the result from casting any
# non-BLOB value into a BLOB and the result from casting any BLOB value
# into a non-BLOB value may be different depending on whether the
# database encoding is UTF-8, UTF-16be, or UTF-16le.

R-48118-34840-54112-17431-20305-06499-24777-65466 tcl slt th3 src

To convert the results of an SQL expression to a boolean value, SQLite first casts the result to a NUMERIC value in the same way as a CAST expression. A numeric zero value (integer value 0 or real value 0.0) is considered to be false. A NULL value is still NULL. All other values are considered true.

th3/req1/expr03.test:14

/* IMP: R-48118-34840 */
# EVIDENCE-OF: R-48118-34840 To convert the results of an SQL expression
# to a boolean value, SQLite first casts the result to a NUMERIC value
# in the same way as a CAST expression. A numeric zero value (integer
# value 0 or real value 0.0) is considered to be false. A NULL value is
# still NULL. All other values are considered true.

R-62477-06476-47005-06861-24657-48512-17530-06708 tcl slt th3 src

For example, the values NULL, 0.0, 0, 'english' and '0' are all considered to be false.

tcl/e_expr.test:1873

/* IMP: R-62477-06476 */
# EVIDENCE-OF: R-62477-06476 For example, the values NULL, 0.0, 0,
# 'english' and '0' are all considered to be false.

R-55532-10108-63513-58109-24698-43338-62703-39415 tcl slt th3 src

Values 1, 1.0, 0.1, -0.1 and '1english' are considered to be true.

tcl/e_expr.test:1892

/* IMP: R-55532-10108 */
# EVIDENCE-OF: R-55532-10108 Values 1, 1.0, 0.1, -0.1 and '1english' are
# considered to be true.

R-59344-06440-62952-57613-16293-38554-64918-31058 tcl slt th3 src

It is possible to have an aggregate function with the same name as a simple function, as long as the number of arguments for the two forms of the function are different.

th3/req1/func05.test:12

/* IMP: R-59344-06440 */
# EVIDENCE-OF: R-59344-06440 It is possible to have an aggregate
# function with the same name as a simple function, as long as the
# number of arguments for the two forms of the function are different.

R-47913-44653-19019-51800-53744-51346-51796-57702 tcl slt th3 src

For example, the max() function with a single argument is an aggregate and the max() function with two or more arguments is a simple function.

th3/req1/func05.test:16

/* IMP: R-47913-44653 */
# EVIDENCE-OF: R-47913-44653 For example, the max() function with a
# single argument is an aggregate and the max() function with two or
# more arguments is a simple function.