DCL statements manage who is allowed to see or change your data. It's the smallest of the four SQL families, built from just two commands.
Gives a user or role permission to perform an action.
GRANT permission
ON object
TO user;GRANT SELECT
ON Employee
TO User1;Common Mistake
Granting broader permissions (e.g. ALL) than the task actually needs.
Removes a permission that was previously granted.
REVOKE permission
ON object
FROM user;REVOKE SELECT
ON Employee
FROM User1;Common Mistake
Revoking access without checking what else depends on it.
DCL is about permissions — the next lesson covers TCL, the family that manages when a group of changes becomes permanent.