Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

adding a new constraint

Roger25Aug 27 2009 — edited Aug 27 2009
Question: 225 (G)
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;

Answer: C

C ? why? the question askes which statemens ADDS a constraint. so in my opinion the correct answer should be A
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 24 2009
Added on Aug 27 2009
2 comments
890 views