Difficulty: Easy
Correct Answer: Incorrect
Explanation:
Introduction / Context: CHECK constraints are part of SQL’s declarative integrity features that let designers restrict permissible values in a column or row. The prompt asserts that SQL-92 fully specified CHECK, and that implementations are consistent across vendors. This question tests your understanding of the standard versus actual DBMS support and portability concerns for constraints.
Given Data / Assumptions:
Concept / Approach: While SQL-92 defines CHECK at the column and table level, vendors historically diverged in support. Some accepted definitions but ignored enforcement or postponed it; others limited expressions, subqueries, or user-defined functions; and naming, deferrability, and error messaging vary. Therefore, the idea that CHECK is consistently implemented is not accurate in practice. Standards define behavior; implementations can, and often do, lag or differ.
Step-by-Step Solution:
Identify the standard: SQL-92 includes CHECK constraints.Compare vendors historically and currently: differences exist (expression support, enforcement timing, deferrable behavior, error codes).Determine consistency claim: it fails due to observable cross-DBMS variance.Conclude: the statement is incorrect.Verification / Alternative check: Consider engines that long accepted CHECK syntax but did not enforce it, or engines that restrict expressions in CHECK. Porting a schema with complex CHECK logic often requires vendor-specific rewrites or tests, proving inconsistency.
Why Other Options Are Wrong:
Common Pitfalls: Assuming that presence in the standard guarantees uniform implementation; overlooking vendor-specific restrictions; forgetting to test CHECK behavior when migrating between DBMS products.
Final Answer: Incorrect
Discussion & Comments