SQL Questions
Most of you would have come across several questions. I am posting my own questions. I hope these will be useful for you. If you have any doubts you can contact me.
* You need to disable all triggers on the EMPLOYEES table. Which command accomplishes this?
A. None of these commands; you cannot disable multiple triggers on a table in one command.
B. ALTER TRIGGERS ON TABLE employees DISABLE;
C. ALTER employees DISABLE ALL TRIGGERS;
D. ALTER TABLE employees DISABLE ALL TRIGGERS;
* You have a row level BEFORE UPDATE trigger on the EMP table. This trigger contains a SELECT statement on the EMP table to ensure that the new salary value falls within the minimum and maximum salary for a given job title. What happens when you try to update a salary value in the EMP table?
A. The trigger fires successfully.
B. The trigger fails because it needs to be a row level AFTER UPDATE trigger.
C. The trigger fails because a SELECT statement on the table being updated is not allowed.
D. The trigger fails because you cannot use the minimum and maximum functions in a BEFORE UPDATE trigger.
* You need to implement a virtual private database (vpd). In order to have the vpd functionality, a trigger is required to fire when every user initiates a session in the database. What type of trigger needs to be created?
A. DML trigger
B. System event trigger
C. INSTEAD OF trigger
D. Application trigger
* Which two program declarations are correct for a stored program unit? (Choose two)
A. CREATE OR REPLACE FUNCTION tax_amt (p_id NUMBER) RETURN NUMBER
B. CREATE OR REPLACE PROCEDURE tax_amt (p_id NUMBER) RETURN NUMBER
C. CREATE OR REPLACE PROCEDURE tax_amt (p_id NUMBER, p_amount OUT NUMBER)
D. CREATE OR REPLACE FUNCTION tax_amt (p_id NUMBER) RETURN NUMBER(10,2)
E. CREATE OR REPLACE PROCEDURE tax_amt (p_id NUMBER, p_amount OUT
NUMBER(10, 2))
* The creation of which four database objects will cause a DDL trigger to fire? (Choose four)
A. Index
B. Cluster
C. Package
D. Function
E. Synonyms
F. Dimensions
G. Database links 4
