Complete the code to grant SELECT permission on the employees table to user 'john'.
GRANT [1] ON employees TO 'john';
The SELECT privilege allows the user to read data from the table, which is essential for controlled data access.
Complete the code to revoke UPDATE permission from user 'alice' on the sales table.
REVOKE [1] ON sales FROM 'alice';
UPDATE permission allows modifying existing data. Revoking it prevents unauthorized changes.
Fix the error in the code to grant all privileges on the database 'company' to user 'bob'.
GRANT [1] ON company.* TO 'bob';
The correct syntax to grant all privileges is 'ALL PRIVILEGES'.
Fill both blanks to create a user 'carol' with password 'secure123' and grant SELECT permission on the products table.
CREATE USER 'carol'@'localhost' IDENTIFIED BY '[1]'; GRANT [2] ON products TO 'carol'@'localhost';
The password must match the user's password, and SELECT permission allows reading the products table.
Fill all three blanks to revoke INSERT and UPDATE permissions from user 'dave' on the orders table and then drop the user.
REVOKE [1], [2] ON orders FROM 'dave'; DROP USER '[3]';
We revoke INSERT and UPDATE permissions, then drop the user named 'dave'.