How can I delete several tables at the same time? New User Guide
Source: Internet
Author: User
How can I delete several tables at the same time? How can I delete the ID information of a table based on the ID in the background management? Urgent... now that & nbsp; id & nbsp; is available, you can continue to delete the table or advanced: Use a trigger. the manual says: how can I delete several tables at the same time in FOR & nbsp; E? New User Guide
In the background management, information about a table is deleted based on the ID. how can I delete the ID information of several other tables? Urgent ..
------ Solution --------------------
If you have an id, continue to delete it.
Or advanced: Use a trigger.
------ Solution --------------------
Manual description:
By using the BEGIN... END compound statement structure after the for each row, you can define the trigger program FOR executing multiple statements.
------ Solution --------------------
DELIMITER $
Create trigger xi_delete after delete
ON xinxi for each row
FOR EACH ROW
BEGIN
Delete from us_xi where userid = old. userid,
Delete from ccs_image where userid = old. userid,
Delete from guestbook where userid = old. userid,
Delete from friends where userid = old. userid;
END $
DELIMITER;
------ Solution --------------------
The boss said, "If you have an id, continue to delete it ".
Join table deletion!
------ Solution --------------------
Generally, they are deleted one by one.
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