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)