Database objects-stored procedures and triggers

Source: Internet
Author: User

Stored Procedures and triggers are a set of SQL statements. During database development, they maintain and manage databases and maintain the integrity of database references, it plays an irreplaceable role. A trigger is a special stored procedure. The stored procedure is independent of a table and has the function of accessing and manipulating database data, which further improves the application execution efficiency. A trigger is also a collection of t_ SQL statements. It works closely with tables to implement more complex business rules in tables.

Stored procedures are a collection of pre-compiled t_ SQL statements stored in a database. They can be executed independently or by calling applications.


Triggers are not directly called by users, but are automatically executed during update, insert, or delete operations on the table or view data. A table or view can have multiple triggers. Each trigger can contain complex SQL statements. in addition to the corresponding constraints of primary keys and Foreign keys, you can also use triggers to implement more complex User-Defined integrity constraints.

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.