Final answer:
The correct SQL statement for adding a CHECK constraint is: ALTER TABLE R ADD CONSTRAINT RCHK CHECK (A IN (SELECT C FROM S)); This ensures that values in column A of table R are limited to those in column C of table S.
Step-by-step explanation:
The question is related to SQL and how to correctly add a CHECK constraint to a table with an ALTER TABLE statement. The correct option among the given choices is:
- d. ALTER TABLE R ADD CONSTRAINT RCHK CHECK (A IN (SELECT C FROM S));
This statement is valid because it sets a constraint that ensures the values in column A of table R are limited to those values that also appear in column C of table S. The subquery (SELECT C FROM S) returns the set of values from column C of table S, which are then used as a reference for the values allowed in column A of table R.