The DDL or Data Control Language is basically a syntax that is similar to the computer programming language that can be used to control access to the information stored in a database. DCL can be used to access this stored data, and it is used mainly to revoke and grant the users the required access to any database.

In this article, we will take a look at the Data Control Language according to the GATE Syllabus for CSE (Computer Science Engineering). Read ahead to learn more.

Table of Contents

What is Data Control Language?

The DCL or Data Control Language refers to a query language. It allows its users to edit and retrieve data that is held in databases.

Types of DCL

There are basically two types of Data Control Language commands, they are:

GRANT Command

This command gives the users the privileges of access to a database. This command can be used to grant UPDATE, INSERT, DELETE, and SELECT privileges to its users on several tables or on a single table. Visit to learn more about the GRANT command here.

Here is the Syntax of the GRANT Command:

GRANT SELECT, UPDATE ON USER_TABLE TO OTHER_USER, ANOTHER_USER;

For Example:

GRANT INSERT, SELECT on users to Priyesh

Thus, using the grant command, Priyesh has been granted permission on the “users” database objects, and he can insert or query the “users” database.

REVOKE Command

The REVOKE command is used to take permissions back from the user. This command is mainly used to (by default) revoke a privilege or a specific command, like DELETE or UPDATE, depending on the situation. Visit to learn more about the REVOKE command here.

Here is the syntax of the REVOKE Command:

REVOKE name_of_privilege ON name_of_object FROM {name_of_user |PUBLIC | name_of_role}

For Example:

REVOKE INSERT, SELECT on users from Priyesh

Thus, when we use this command, the permissions of Priyesh (like insert or query) on the “users” database objects have been removed. Read more on GRANT and REVOKE here.

Keep learning and stay tuned to get the latest updates on GATE Exam along with GATE Eligibility Criteria, GATE 2023, GATE Admit Card, GATE Syllabus, GATE Previous Year Question Paper, and more.

Also Explore,

Comments

Leave a Comment

Your Mobile number and Email id will not be published.

*

*