You are on page 1of 7

18CSC301J– Data Management

Systems
Unit –1 : Session –14 : SLO -2

SRM Institute of Science and Technology 1


Data Control Language
• AIM:
• To create a database using Data Control Commands to manage
transactions in the database.

• Syntax:

• The GRANT command adds new permissions to a database


user. It has a very simple syntax, defined as follows:

SRM Institute of Science and Technology


• GRANT: Used to provide any user access
privileges or other privileges for the database.

SRM Institute of Science and Technology


• REVOKE: Used to take back permissions from
any user.

SRM Institute of Science and Technology


• It is a part of the structured query language (SQL).
• It helps in controlling access to information stored in a
database. It complements the data manipulation language
(DML) and the data definition language (DDL).
• It is the simplest among three commands.
• It provides the administrators, to remove and set database
permissions to desired users as needed.
• These commands are employed to grant, remove and deny
permissions to users for retrieving and manipulating a
database
• In DCL we have two commands,
• GRANT
• GRANT: Used to provide any user access privileges or other
privileges for the database.
GRANT privilege_name on objectname to user;
• privilege names are
SELECT,UPDATE,DELETE,INSERT,ALTER,ALL
• objectname is table name
• user is the name of the user to whom we grant privileges.
• REVOKE
• It is employed to remove a privilege from a user. REVOKE
helps the owner to cancel previously granted permissions.
• REVOKE privilege_name on objectname from user;
• privilege names are
SELECT,UPDATE,DELETE,INSERT,ALTER,ALL
• objectname is table name
• user is the name of the user whose privileges are removing

• REVOKE SELECT, UPDATE ON employees TO Aakash

You might also like