The specific definition of Oracle triggers, when to use! The advantage is what!

Source: Internet
Author: User
A trigger (trigger) is a special stored procedure whose execution is not invoked by the program or manually, but is triggered by an event, such as when an operation on a table (Insert,delete, update) activates it for execution. Triggers are often used to enforce data integrity constraints, business rules, and so on. Triggers can be found in the dba_triggers, user_triggers data dictionary.

Advantages OF Triggers

Triggers can implement cascading changes through related tables in the database, but these changes can be performed more efficiently by cascading referential integrity constraints. Triggers can enforce more complex constraints than constraints defined with a CHECK constraint. Unlike CHECK constraints, triggers can reference columns in other tables. For example, a trigger can compare inserted or updated data with a SELECT from another table, and perform other actions, such as modifying data or displaying user-defined error information. Triggers can also evaluate the state of the tables before and after data modification and take countermeasures based on their differences. Multiple similar triggers (INSERT, UPDATE, or DELETE) in a table allow multiple different actions to respond to the same modification statement

The specific definition of Oracle triggers, when to use! The advantage is what!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.