Tag: databases

Questions Related to databases

  1. we can use Application Trigger to fire when a DELETE statement occurs

  2. we can use database Trigger to fire when a INSERT statement occurs

  3. we can use System event Trigger to fire when a DELETE statement occurs

  4. we can use INSTEAD OF trigger to fire when a INSERT statement occurs


Correct Option: B
  1. DURING

  2. INSTEAD

  3. ON SHUTDOWN

  4. BEFORE


Correct Option: D

CALL statement inside the trigger body enable to call ?

  1. Package

  2. Stored function

  3. Stored procedure

  4. Another DB trigger


Correct Option: C

AI Explanation

To answer this question, you need to understand triggers and their capabilities.

Triggers are database objects that are automatically executed in response to specific events, such as changes to data in a table. They can be used to enforce business rules, perform auditing, or automatically update related data.

When a trigger is fired, it can execute SQL statements or call other database objects. In this case, the CALL statement is used to call a stored procedure. Therefore, the correct answer is C) Stored procedure.

Let's go through each option to understand why it is correct or incorrect:

Option A) Package - A CALL statement inside a trigger body cannot directly call a package. However, a stored procedure or function within the package can be called using the CALL statement.

Option B) Stored function - A CALL statement inside a trigger body can call a stored function. This is a valid option, but it is not the correct answer given in the question.

Option C) Stored procedure - A CALL statement inside a trigger body can call a stored procedure. This is the correct answer, as stated in the question.

Option D) Another DB trigger - A CALL statement inside a trigger body can call another trigger. However, it is generally not recommended to have triggers calling other triggers directly, as it can lead to complex and difficult-to-maintain code.

Therefore, the correct answer is C) Stored procedure. This option is correct because a CALL statement inside a trigger body enables the calling of a stored procedure.

  1. DELETE TRIGGER business_hour

  2. DROP TRIGGER business_hour

  3. REMOVE TRIGGER business_hour

  4. ALTER TRIGGER business_hour remove


Correct Option: B

The OLD and NEW Qualifier is used in which type of trigger?

  1. Row level DML trigger

  2. Statement level DML trigger

  3. System trigger

  4. Application Trigger


Correct Option: A
  1. ALTER TRIGGERS ON TABLE EMP DISABLE

  2. ALTER EMP DISABLE ALL TRIGGERS

  3. NOT POSSIBLE TO DISABLE TRIGGERS

  4. ALTER TABLE EMP DISABLE ALL TRIGGERS


Correct Option: D
  1. Full table scan

  2. Table access by ROWID

  3. Access via unique index

  4. Primary key access


Correct Option: B