Which statement adds a constraint that ensures the CUSTOMER_NAME column of the CUSTOMERS table holds a value?

Which statement adds a constraint that ensures the CUSTOMER_NAME column of the
CUSTOMERS table holds a value?

Which statement adds a constraint that ensures the CUSTOMER_NAME column of the
CUSTOMERS table holds a value?

A.
ALTER TABLE customers ADD CONSTRAINT cust_name_nn CHECK customer_name IS
NOT NULL;

B.
ALTER TABLE customers MODIFY CONSTRAINT cust_name_nn CHECK customer_name IS
NOT NULL;

C.
ALTER TABLE customers MODIFY customer_name CONSTRAINT cust_name_nn NOT NULL;

D.
ALTER TABLE customers MODIFY customer_name CONSTRAINT cust_name_nn IS NOT
NULL;

E.
ALTER TABLE customers MODIFY name CONSTRAINT cust_name_nn NOT NULL;

F.
ALTER TABLE customers ADD CONSTRAINT cust_name_nn CHECK customer_name NOT
NULL;



Leave a Reply 3

Your email address will not be published. Required fields are marked *


kellar

kellar

I think none of the answers are right
->Check constraint should have parenthesis
After applying parethesis A would be the answer

Sagar

Sagar

As mentioned, option C is the correct answer..

juli

juli

ALTER TABLE customers ADD CONSTRAINT cust_name_nn CHECK (customer_name IS NOT NULL); –done
ALTER TABLE customers ADD CONSTRAINT cust_name_nn CHECK (customer_name NOT NULL); –not done
ALTER TABLE customers ADD CONSTRAINT cust_name_nn CHECK (customer_name) IS NOT NULL; –notdone