Which of the following statements is true concerning routines and triggers?

  1. Both consist of procedural code

  2. Both have to be called to operate.

  3. Both run automatically.

  4. Both are stored in the database.


Correct Option: A

AI Explanation

To answer this question, you need to understand the concepts of routines and triggers.

Option A) Both consist of procedural code - This option is correct because both routines and triggers are pieces of procedural code that can be executed in a database.

Option B) Both have to be called to operate - This option is incorrect. Routines are called explicitly by a user or program, while triggers are automatically executed in response to a specific event or action.

Option C) Both run automatically - This option is incorrect. Routines require explicit invocation, while triggers are automatically executed when a defined event or action occurs.

Option D) Both are stored in the database - This option is incorrect. Routines can be stored in the database as stored procedures, functions, or packages, but triggers are stored as part of the database schema.

The correct answer is Option A) Both consist of procedural code. This option is correct because both routines and triggers are pieces of procedural code that can be executed in a database.

Find more quizzes: