"Database" MySQL database (v)

Source: Internet
Author: User

A. DCL statement

1. Add Permissions:

1 Grant Select,insert on Sakila. *  to ' Z1 '@'localhost'by'123' ; 2 Note: Sakili is the database name, Z1 is the newly created database user, and 123 is the password
Database Add Permissions

2. Permission to recover:

1 Revoke Insert  on Sakila. *  from ' Z1 '@'localhost';
Permission Recall

Second, foreign key

1. The index type of the foreign key:

(1) RESTRICT: The parent table cannot be updated if the child table is associated with a record.

(2) No ACTION: restricts the parent table from being updated if the child table is associated with a record.

(3) CASCADE: The parent table updates or deletes the corresponding record of the child table when it is updated or deleted.

(4) Set null: The corresponding field of the child table is set NULL when the parent table is updated or deleted.

"Database" MySQL database (v)

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.