From all the givens, don't understand why B is the correct answer. There is no prior index on the table according to the exhibit. Please explain. Thanks
View the Exhibit and examine the structure of the EMP table.
You executed the following command to add a primary key to the EMP table:
ALTER TABLE emp ADD CONSTRAINT emp_id_pk
PRIMARY KEY (emp_id) USING INDEX emp_id_idx;
Which statement is true regarding the effect of the command?
Name Null? Type
EMP_ID NUMBER(3)
EMP_NAME VARCHAR2(10)
SALARY NUMBER(10,2)
A. The PRIMARY KEY is created along with a new index.
B. The PRIMARY KEY is created and it would use an existing unique index.
C. The PRIMARY KEY would be created in a disabled state because it is using an existing index.
D. The statement produces an error because the USING clause is permitted only in the CREATE TABLE command.
Answer: B
"There is no prior index on the table according to the exhibit"
The "exhibit" states clearly that there is no previous index ?
If index 'emp_id_idx' doesn't exist when the command is executed, you would get an error saying so.
On a side note. If you are planning to post more similar questions here, you need to find a way to present your code in a more readable format. If the site's "code" tool is not working properly you could use an external site such as pastebin.com (In that case you'd create your question without links, and then add the link here in the discussion section).
Free Guide: Managing storage for virtual environments
Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Don’t miss out on this exclusive content!
Discuss This Question: 1  Reply