What is the purpose of DCL Language?

DCL (Data Control Language) allows users to control access and permission management to the database. It is the subset of a database, which decides what part of the database should be accessed by which user at what point of time. It includes two commands, GRANT and REVOKE.

  • GRANT: It enables system administrators to assign privileges and roles to specific user accounts to perform specific tasks on the database.
  • REVOKE: It enables system administrators to revoke privileges and roles from the user accounts so that they cannot use the previously assigned permission on the database.

Example
GRANT * ON mydb.Student TO mail@localhsot;