GRANT statement: It is used to set privileges for users on database objects. A privilege is permission for a user to do specific tasks in a database. For using GRANT statement you have to be owner of a particular database object.
GRANT SELECT, INSERT ON EMPLOYEES TO MAX
Here, SELECT and INSERT is the privilege which is set to the user with user id MAX. EMPLOYEES is the table on which the permission is granted.
GRANT statement can also be used for granting update access to individual columns of a table or a view.
GRANT UPDATE (EMPL_NUM, SALARY) ON EMPLOYEES TO MAX
WITH GRANT OPTION: It is used to grant permissions so that the user to which the permissions has been granted can use the GRANT statement to grant permissions to other users.
GRANT SELECT ON EMPLOYEES TO MAX WITH GRANT OPTION
Now, if MAX wishes to grant permission to another user of his choice, he can do that.
REVOKE statement: It is used to revoke privileges for users on database objects.
REVOKE SELECT, INSERT ON EMPLOYEES TO MAX
WITH GRANT OPTION: To understand how the REVOKE statement works WITH GRANT OPTION, consider this example: MAX grants permissions to another user say MARY by using WITH GRANT OPTION statement. Now, MARY grants permissions to another user TOM. If MAX revokes the permissions of MARY by using REVOKE statement, then permissions of user TOM are automatically revoked.