![Trending Articles on Technical and Non Technical topics](/images/trending_categories.jpeg)
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Difference Between Grant and Revoke
In this post, we will understand the difference between grant and revoke.
Grant
It is a DCL command.
It grants permissions to users on database objects.
It can also be used to assign access rights to users.
For every user, the permissions need to be specified.
When the access is decentralized, permission granting is easier.
Syntax:
grant privilege_name on object_name to {user_name | public | role_name}
Revoke
It is a DCL command.
It removes permissions if they are granted to users on database objects.
It takes away/revokes the rights of the users.
If access for a user is removed, all specific permissions provided by that user to others will be removed.
If decentralized access is used, it would be difficult to remove granted permissions.
Syntax
revoke privilege_name on object_name from {user_name | public | role_name}
Advertisements