Вы находитесь на странице: 1из 2

Test: Quiz: Managing Triggers Bekijk uw antwoorden, feedback en scores hieronder.

Een asterisk (*) geeft een goed antwoord aan. Section 1 (Beantwoord alle vragen in deze sectie.) 1. User KULJIT creates two triggers named EMP1_TRIGG and EMP2_TRIGG, which are both DML triggers referencing her EMPLOYEES table. Kuljit now wants to remove both of these triggers from the database. What command(s) should Kuljit use to do this? 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 2. Which command would you use to see if your triggers are enabled or disabled? 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 3. By default, any user can create a DML trigger on a table in his/her schema. True or False? Waar Niet waar (*) Correct 4. 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? The table is dropped but the trigger is not dropped. An error message is displayed because you cannot drop a table that is referenced by a trigger. The table is dropped and the trigger is disabled. Markeren voor nakijken (1) Punten Markeren voor nakijken (1) Punten Markeren voor nakijken (1) Punten Markeren voor nakijken (1) Punten

Both the table and the trigger are dropped. (*) Correct 5. Which dictionary view would you query to see the detailed body code of triggers in your schema? USER_SOURCE USER_TRIGGER USER_TRIGGERS (*) USER_OBJECTS None of the above, you cannot view the code of the trigger body after the trigger has been created. Correct 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 command should you use? ALTER TRIGGER DISABLE ALL ON departments; ALTER TABLE departments DISABLE ALL TRIGGERS; (*) ALTER TABLE departments DISABLE TRIGGERS; DROP ALL TRIGGERS ON departments; Correct Markeren voor nakijken (1) Punten Markeren voor nakijken (1) Punten

Вам также может понравиться