Which statment about trigger is TRUE ?

  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

AI Explanation

To answer this question, let's go through each option to understand why it is correct or incorrect:

Option A) We can use Application Trigger to fire when a DELETE statement occurs - This option is incorrect. Application triggers are specific to certain applications and are not directly related to database operations such as DELETE statements.

Option B) We can use database Trigger to fire when an INSERT statement occurs - This option is correct. Database triggers can be defined to fire before or after various database operations, including INSERT statements.

Option C) We can use System event Trigger to fire when a DELETE statement occurs - This option is incorrect. System event triggers are used to respond to system-level events, such as system startup or shutdown, rather than specific database operations like DELETE statements.

Option D) We can use INSTEAD OF trigger to fire when an INSERT statement occurs - This option is incorrect. INSTEAD OF triggers are typically used with views and allow the trigger to take the place of the actual DML operation (e.g., INSERT, UPDATE, DELETE). However, they are not specific to INSERT statements only.

The correct answer is option B. We can use a database trigger to fire when an INSERT statement occurs. Database triggers are commonly used to define actions that are automatically executed in response to specific database events.

Find more quizzes: