Small. Fast. Reliable.
Choose any three.

SQLite Requirement Matrix Details
gencol.html

Index Summary Markup Original


R-14902-14650-01699-08626-33973-09336-38963-61808 tcl slt th3 src

Generated columns can have a datatype.

/* IMP: R-14902-14650 */
# EVIDENCE-OF: R-14902-14650 Generated columns can have a datatype.

R-41146-12423-20310-63569-37846-41405-23151-59633 tcl slt th3 src

SQLite attempts to transform the result of the generating expression into that datatype using the same affinity rules as for ordinary columns.

/* IMP: R-41146-12423 */
# EVIDENCE-OF: R-41146-12423 SQLite attempts to transform the result of
# the generating expression into that datatype using the same affinity
# rules as for ordinary columns.

R-44743-26048-26164-09256-55055-05174-57916-33189 tcl slt th3 src

Generated columns may have NOT NULL, CHECK, and UNIQUE constraints, and foreign key constraints, just like ordinary columns.

/* IMP: R-44743-26048 */
# EVIDENCE-OF: R-44743-26048 Generated columns may have NOT NULL, CHECK,
# and UNIQUE constraints, and foreign key constraints, just like
# ordinary columns.

R-63827-58581-51732-64119-62268-23504-01315-64410 tcl slt th3 src

Generated columns can participate in indexes, just like ordinary columns.

/* IMP: R-63827-58581 */
# EVIDENCE-OF: R-63827-58581 Generated columns can participate in
# indexes, just like ordinary columns.

R-22464-05974-13353-12575-31195-54661-61656-32852 tcl slt th3 src

The expression of a generated column can refer to any of the other declared columns in the table, including other generated columns, as long as the expression does not directly or indirectly refer back to itself.

/* IMP: R-22464-05974 */
# EVIDENCE-OF: R-22464-05974 The expression of a generated column can
# refer to any of the other declared columns in the table, including
# other generated columns, as long as the expression does not directly
# or indirectly refer back to itself.

R-29353-35916-54935-35443-09756-12894-62191-13348 tcl slt th3 src

Generated columns can occur anywhere in the table definition.

/* IMP: R-29353-35916 */
# EVIDENCE-OF: R-29353-35916 Generated columns can occur anywhere in the
# table definition.

R-59999-34429-08748-48712-52487-44530-24268-48005 tcl slt th3 src

Generated columns can be interspersed among ordinary columns.

/* IMP: R-59999-34429 */
# EVIDENCE-OF: R-59999-34429 Generated columns can be interspersed among
# ordinary columns.

R-59397-60114-59301-44215-47369-22942-27606-21904 tcl slt th3 src

It is not necessary to put generated columns at the end of the list of columns in the table definition, as is shown in the examples above.

/* IMP: R-59397-60114 */
# EVIDENCE-OF: R-59397-60114 It is not necessary to put generated
# columns at the end of the list of columns in the table definition, as
# is shown in the examples above.

R-44118-24115-09333-12766-04940-32044-13276-33930 tcl slt th3 src

Generated columns may not have a default value (they may not use the "DEFAULT" clause).

/* IMP: R-44118-24115 */
# EVIDENCE-OF: R-44118-24115 Generated columns may not have a default
# value (they may not use the "DEFAULT" clause).

R-43641-06233-62582-50959-46555-19334-21762-55443 tcl slt th3 src

Generated columns may not be used as part of the PRIMARY KEY.

/* IMP: R-43641-06233 */
# EVIDENCE-OF: R-43641-06233 Generated columns may not be used as part
# of the PRIMARY KEY.

R-24770-07833-20413-40492-33395-44315-54642-50376 tcl slt th3 src

The expression of a generated column may only reference constant literals and columns within the same row, and may only use scalar deterministic functions.

/* IMP: R-24770-07833 */
# EVIDENCE-OF: R-24770-07833 The expression of a generated column may
# only reference constant literals and columns within the same row, and
# may only use scalar deterministic functions.

R-64797-45496-20081-43950-39002-36712-47915-33301 tcl slt th3 src

The expression may not use subqueries, aggregate functions, window functions, or table-valued functions.

/* IMP: R-64797-45496 */
# EVIDENCE-OF: R-64797-45496 The expression may not use subqueries,
# aggregate functions, window functions, or table-valued functions.

R-65413-22646-29156-64725-36805-48680-56286-58533 tcl slt th3 src

The expression of a generated column may refer to other generated columns in the same row, but no generated column can depend upon itself, either directly or indirectly.

/* IMP: R-65413-22646 */
# EVIDENCE-OF: R-65413-22646 The expression of a generated column may
# refer to other generated columns in the same row, but no generated
# column can depend upon itself, either directly or indirectly.

R-39225-16568-52968-30010-37247-11603-25439-49402 tcl slt th3 src

The expression of a generated column may not directly reference the ROWID, though it can reference the INTEGER PRIMARY KEY column, which is often the same thing.

/* IMP: R-39225-16568 */
# EVIDENCE-OF: R-39225-16568 The expression of a generated column may
# not directly reference the ROWID, though it can reference the INTEGER
# PRIMARY KEY column, which is often the same thing.

R-31195-28735-28971-60122-53361-51297-04226-18526 tcl slt th3 src

Every table must have at least one non-generated column.

/* IMP: R-31195-28735 */
# EVIDENCE-OF: R-31195-28735 Every table must have at least one
# non-generated column.

R-37821-32925-08521-48318-15093-49732-47345-21314 tcl slt th3 src

It is not possible to ALTER TABLE ADD COLUMN a STORED column.

/* IMP: R-37821-32925 */
# EVIDENCE-OF: R-37821-32925 It is not possible to ALTER TABLE ADD
# COLUMN a STORED column.

R-04196-57626-61591-44020-20208-08318-09157-59065 tcl slt th3 src

One can add a VIRTUAL column, however.

/* IMP: R-04196-57626 */
# EVIDENCE-OF: R-04196-57626 One can add a VIRTUAL column, however.