Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

SQLPLUS 21. Evaluate this command: TRUNCATE TABLE inventory; Which two statement

ID: 3916442 • Letter: S

Question

SQLPLUS

21. Evaluate this command:  TRUNCATE TABLE inventory;  

Which two statements about this TRUNCATE TABLE command are true? (Choose two.)  

a. This statement will retain the structure of the INVENTORY table.  

b. You must be the owner of the INVENTORY table to use this command.  

c. The results of this statement can be rolled back using the ROLLBACK command.  

d. This statement will permanently remove all the data from the INVENTORY table.  

e. This statement will produce the same result as the DROP TABLE inventory command.  

22. Tim created the SCHEDULE table. These are the columns in the SCHEDULE table:  

ID   NUMBER(9)   PK  

NAME   VARCHAR2(25)  

CLASS_DATE   DATE

  

He granted you the INSERT privilege on the table. You insert three records into the SCHEDULE table  

without issuing a COMMIT command. Tim issues this command:  

SELECT * FROM schedule;  

Which three statements are true? (Choose three.)  

a. Tim will be able to access the SCHEDULE table.  

b. Tim will NOT be able to access the SCHEDULE table.  

c. Tim will see the three records you inserted into the SCHEDULE table.  

d. Tim will NOT see the three records you inserted into the SCHEDULE table.  

e. Tim will NOT be able to insert the same records into the SCHEDULE table.  

23. Which ALTER TABLE statement would you use to add a primary key constraint on the  

MANUFACTURER_ID column of the INVENTORY table?  

a. ALTER TABLE inventory  

ADD CONSTRAINT manufacturer_id PRIMARY KEY;  

b. ALTER TABLE inventory  

ADD CONSTRAINT PRIMARY KEY (manufacturer_id);  

c. ALTER TABLE inventory  

MODIFY manufacturer_id CONSTRAINT PRIMARY KEY;  

d. ALTER TABLE inventory  

MODIFY CONSTRAINT PRIMARY KEY manufacturer_id;  

24. Evaluate the DEPARTMENT table:  

DEPT_ID NUMBER(9)  

DEPT_NAME VARCHAR2(20)  

REGION_ID NUMBER(9)  

The REGION_ID column has a foreign key constraint to the REGION table. You attempt to update the  

DEPARTMENT table using this statement:  

UPDATE department  

SET dept_id = 6546,  

region_id = 9705  

WHERE dept_id = 8940;  

You receive this error:  

ORA?02291: integrity constraint (SYS_C23) violated ? parent key not found  

What caused this error to be generated?

  

a. Value 6546 already exists in the REGION table.  

b. Value 6546 already exists in the DEPARTMENT table.  

c. Value 9705 does not exist in the REGION table.  

d. Value 8940 does not exist in the DEPARTMENT table.  

25. You create this sequence:

CREATE SEQUENCE part_id;  

How many sequential values will the Oracle Server pre?allocate and keep in memory?  

a. 1  

b. 20  

c. 100  

d. none

Explanation / Answer

Answer 21:

Option A and D

Answer 22:

Option A,D,E

Answer23:

Option D

Answer 24:

Option C

Answer 25:

Option B