You are on page 1of 3

Test: Quiz: Managing Triggers 1.

Which command would you use to see if your triggers are enabled or disa bled? Mark for Review (1) Points SELECT trigger_name, status FROM USER_TRIGGERS; (*)

SELECT object_name, status FROM USER_OBJECTS WHERE object_type = 'TRIGGER'; SELECT trigger_name, trigger_type FROM USER_TRIGGERS; DESCRIBE TRIGGER

Correct 2. Which dictionary view would you query to see the detailed body code of triggers in your schema? Mark for Review (1) Points USER_SOURCE USER_TRIGGER USER_TRIGGERS (*) USER_OBJECTS None of the above, you cannot view the code of the trigger body after th e trigger has been created.

Incorrect. Refer to Section 13 Lesson 5. 3. By default, any user can create a DML trigger on a table in his/her sch ema. True or False? Mark for Review (1) Points True

False (*)

Incorrect. Refer to Section 13 Lesson 5. 4. User KULJIT creates two triggers named EMP1_TRIGG and EMP2_TRIGG, which are both DML triggers referencing her EMPLOYEES table. Kuljit now wants to remo ve both of these triggers from the database. What command(s) should Kuljit use t o do this? Mark for Review (1) Points DROP ALL TRIGGERS ON employees; DROP TRIGGERS ON employees; DROP TRIGGER emp1_trigg; DROP TRIGGER emp2_trigg; (*)

DROP TRIGGER emp1_trigg AND emp2_trigg;

Correct 5. A user creates the following trigger: CREATE OR REPLACE TRIGGER emp_trigg AFTER DELETE ON employees BEGIN ... END; The user now tries to drop the EMPLOYEES table. What happens? Mark for Review (1) Points The table is dropped but the trigger is not dropped. An error message is displayed because you cannot drop a table that is re ferenced by a trigger. The table is dropped and the trigger is disabled. Both the table and the trigger are dropped. (*)

Incorrect. Refer to Section 13 Lesson 5.

6. You have created several DML triggers which reference your DEPARTMENTS table. Now you want to disable all of them using a single SQL statement. Which c ommand should you use? Mark for Review (1) Points ALTER TRIGGER DISABLE ALL ON departments; ALTER TABLE departments DISABLE ALL TRIGGERS; (*) ALTER TABLE departments DISABLE TRIGGERS; DROP ALL TRIGGERS ON departments;

Incorrect. Refer to Section 13 Lesson 5.

You might also like