Ask Question
23 February, 11:58

Suppose that a database modification results in the execution of a trigger but that trigger generates another modification that happens to violate a primary-key constraint. What happens?

+4
Answers (1)
  1. 23 February, 14:27
    0
    The database can detect only system-defined events.

    Explanation:

    A trigger is like a stored procedure that Oracle Database invokes automatically whenever a specified event occurs. trigger is like a stored procedure that Oracle Database invokes automatically whenever a specified event occurs.

    Both triggers and constraints can constrain data input, but they differ significantly.

    A constraint applies to both existing and new data. For example, if a database column has a NOT NULL constraint, then its existing data is NOT NULL and no DML statement can violate the NOT NULL constraint.

    A trigger applies only to new data. For example, a trigger can prevent a DML statement from inserting a NULL value into a database column, but the column might contain NULL values that were inserted into the column before the trigger was defined or while the trigger was disabled
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “Suppose that a database modification results in the execution of a trigger but that trigger generates another modification that happens to ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers