Database storage process and trigger Mixing

Source: Internet
Author: User

The stored procedure is reusable.CodeModule to efficiently complete specified operations.

You can also use the CLR method to write stored procedures in the transact-SQL language.
1. There are three types of stored procedures: User-Defined stored procedures, extended stored procedures, and system storage.

Process
Syntax for creating a stored procedure:
Create procedure procedure_name
Parameter_name data_type ,...
With procedure_option
As
SQL _statement
You can use the execute statement to execute the stored procedure. The alter procedure statement already exists.

.
2. A trigger is a special type of stored procedure, which includes a large number of transact-SQL statements.

There are two types: DML triggers and DDL triggers.
DML is divided into three types based on the trigger event types: insert, update, and delete.
DDL trigger events include create, alter, drop, Grant, deny,

Revoke and other statements, and the trigger time condition is only after, without instead.
Generally, DDL triggers are mainly used for the following operations:
Prevents some changes to the database architecture.
You want a situation in the database to make changes in the corresponding database architecture.
Records changes or events in the database architecture.

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.