What is Grant and Revoke in SQL?
SQL is used in multiuser environments. The GRANT command is used to permit users access to the database. It has the following syntax:
GRANT <privilege_name> | ALL ON <object> TO <user|PUBLIC> [WITH GRANT OPTION];
The REVOKE command is used to cancel database privileges from users. It has the following syntax:
REVOKE <privilege_name> | ALL ON object> FROM <user|PUBLIC>;