Database-integrity restrictions in triggers and DomainsDomain integrity restrictions
SQL supports the concept of DOMAIN, and can use the CREATE DOMAIN statement to CREATE a DOMAIN and the integrity constraints that the DOMAIN should meet. [Example 14
MySQL trigger: monitors a situation and triggers an operation
MySQL trigger: monitors a situation and triggers an operation
MySQL trigger: monitors a situation and triggers an operation
I. Four Elements
Trigger time: before/after
Location:
1 Introduction Like the stored procedure, Mysql triggers are embedded into a mysql program. The trigger is a new function of mysql5. Currently, the online fengchao system, Beidou system, and Columbus system use the database of mysql5.0.45. Many
Mysql triggers and transaction operations
Trigger syntax
Create a trigger:
Create trigger trigger_name trigger_time trigger_eventON tbl_name for each row trigger_stmt;
Trigger_time is the time when the program is triggered. It can be BEFORE or AFTER
About Mysql triggers and Mysql triggers
First, the test version is Mysql 5.6.
Then let's look at the trigger syntax.
CREATE [DEFINER = {user| CURRENT_USER}] TRIGGERtrigger_name trigger_time trigger_eventONtbl_nameFOR EACH
Mysql triggers are a very important concept. The following describes the three statuses of mysql triggers for your reference. We hope you can have a deeper understanding of mysql triggers.
CREATE
TRIGGER 'user1 _ user2' after insert on 'user1'
MySQL trigger is only activated by statement. You cannot write two triggers to the same event of the same table. The same event refers to the trigger _
MySQL trigger is only activated by statement. You cannot write two triggers to the same event of
Stored Procedure 5.1 What is a stored procedurestored procedures, SQL statements with logicThe previous SQL has no condition to judge, no loopsStored procedures with Process Control statements (if while)5.2 Stored Procedure Features1) execution
Common SQL statements for database msTruncate table test -- delete all data in the tableAlter table test alter column bb varchar (10) -- modify the field definition in the tableAlter table aa add constraint fk foreign key ([aa]) references bb ([aa])
1 SETAnsi_nulls on2 GO3 SETQuoted_identifier on4 GO5 --Mobile6 --Delete if it exists7 IF(object_id('Trginsert_crm_person_mobile','TR') is not NULL)8 DROP TRIGGERTrginsert_crm_person_mobile9 GOTen --CREATE TRIGGER One CREATE
This article mainly introduces the Mysql statement Quick Review Tutorial (full). For more information, see
Basic operations
View database
show databases;
Character set
create database day15 default character set utf8
View character set
show
The earliest Contact trigger was seen in Yan jianling's video, but he did not understand it at all. However, when the data center charging system was implemented, it turns out that SQL Server has such a powerful feature, which is simply the best
I believe that bloggers or passers-by who read my blog will think that SQLite is small, easy to learn, and simple. Next, I will upload my notes to my blog to help some people and myself. Because I know this is the case.
A few days ago, I saw someone
V. Create Index
Derby supports up to 16 index keys.
The index name cannot exceed 128 characters.
In the same index, each column can appear only once. Different indexes do not have this restriction.
The unique index checks data integrity.
The table
The trigger cannot be used to perform cascade update and deletion. If the foreignkey-to-field name relationship (or the foreignkey-to-unique relationship) uses SQL Server to establish dri. This dri constraint is used for the first test. If you
This article discusses the combined application of MySQL and memcached. The future trend has been gradually clarified. The combination of the two can make MySQL stronger.
Almost a year ago, I wrote an article about ing Mysql Data to memcached. At
From: http://www.cio360.net/h/1784/333770-10872.html
1. Trigger Overview
Trigger is an important tool in SQL Server database applications. It is a special type of Stored Procedure and widely used. Generally, a stored procedure is called directly
MySQL Optimization-triggers and mysql triggers
Reprinted please indicate the source: http://blog.csdn.net/l1028386804/article/details/46763665
A trigger is a special stored procedure. The difference is that the stored procedure must be called by
MySQL trigger, mysql trigger instance
MySQL versions 5.0.2 and later support triggers. A trigger has some time with commands to trigger certain operations.Events include insert statements, delete statements, and update statements..Triggers can be
MySQL trigger learning, mysql triggerTrigger: a special type of thing that can monitor certain data operations and trigger related operations (insert, update, and delete). Some data changes in the table, it is expected that other data changes may
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.