View the Exhibit and examine the description of the CUSTOMERS table.
You want to add a constraint on the CUST_FIRST_NAME column of the CUSTOMERS
table so that the value inserted in the column does not have numbers.
Which SOL statement would you use to accomplish the task?
A.
ALTER TABLE CUSTOMERS
ADD CONSTRAINT cust_f_name
CHECK(REGEXP_LIKE(cust_first_name,,^A-Z’)NOVALIDATE;
B.
ALTER TABLE CUSTOMERS
ADD CONSTRAINT cust_f_name
CHECK(REGEXP_LIKE(cust_first_name,,’^[0-9]’))NOVALIDATE;
C.
ALTER TABLE CUSTOMERS
ADD CONSTRAINT cust_f_name
CHECK(REGEXP_LIKE(cust_first_name,'[[: alpha:]]’))NOVALIDATE;
D.
ALTER TABLE CUSTOMERS
ADD CONSTRAINT cust_f_name
CHECK(REGEXP_LIKE(cust_first_name,'[[: digit: ]]’))NOVALIDATE;
c
all are wrong
C is correct. I checked and it is not possible to insert a string that contains numbers.
But erase “:” from the end of ‘[[: alpha:]]’ ( correct ‘[[: alpha]]’
‘^[[:alpha:] *]*$’