Ask Question

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?

+2
Answers (1)
  1. 4 December, 10:49
    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?
Find 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 the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers