Implementing MySQL sub-table with merge storage engine middleware

Source: Internet
Author: User

It's a good idea to use the merge storage engine middleware to implement MySQL sub-table.

Can look at this blog written very clearly--http://www.cnblogs.com/xbq8080/p/6628034.html

In addition, the use of triggers is as follows:

1 ## MySQL Trigger2 3 T1 Table Insert data also update t2 table4 5```MySQL6(First \d//is to modify the delimiter shortcut, with//concluding sentence, do not have to change back \d, so you can change back with a semicolon '; ' concluding sentence
7 #creating a Write trigger8Create trigger T1 before insert on T1 for eachRow9 beginTenINSERT into T2 (name) VALUES (New.name); One End//
A #Create an UPDATE trigger -Create trigger t2 before update on T1 for eachRow --begin the-Update T2 Set name=New. name where Name=old.name; --End //
- #create a trigger for a delete -Create trigger T3 before delete on T1 for eachRow +-begin ---delete from T2 where name=old.name; +-End // AShow triggers;#Show all the triggers atDrop trigger T3;#Delete a trigger ------------------ - - trigger only supports insert update delete - Syntax: -Create TRIGGER < Trigger name >#name the trigger yourself in{before | after}#the time of the trigger -On TableName#Table name to for eachRow#the interval of the trigger is executed once for each row, not once for the table + - If you want to create a permission that is large enough to root the----------- *```

Implementing MySQL sub-table with merge storage engine middleware

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.