Data Control Language DCL Revoke and Grant Command in SQL
Data Control Language (DCL) Command
An information control dialect (DCL) is a sentence structure like a PC programming dialect used to control access to information put away in a database (Authorization). Specifically, it is a segment of Structured Query Language (SQL). Samples of DCL summons include: GRANT to permit indicated clients to perform determined assignments.
Data Control Language (DCL) is used to control privileges within the Database. These privileges are usually required to perform any operation within the database, such as for creating tables, sequences, or views. Privileges are of two types,
- System: session creation, table etc. are all types of system privilege.
- Object : any query or command, to work on tables, comes under object privilege.
DCL perform two commands,
- Grant: Grants user access privileges to database.
- Revoke: Revoke the permissions from a user.
To Allow a User to create a Session : grant create session to username;
To Allow a User to create a Table : grant create table to username;
To Grant all privilege to a User : grant sysdba to username;
To Grant permission to create any Table : grant create any table to username;
To Grant permission to Drop any Table : grant drop any table to username;
To take back Permissions : revoke create table from username;
More Related Articles For You
- Architecture of DBMS
- CODDS RULE DBMS
- Database Models in DBMS
- Relational DBMS Concepts
- Keys and Types of keys in Database
- Database Normalization
- Generalization, Specialization and Aggregation Concepts in DBMS
- ERD Diagram Tutorial with Examples in DBMS
- Introduction to SQL
- How to Create Query in SQL, Create Table, Delete Table and User Insert Info Statements
- Alter Query Command in SQL, Add, Modify and Drop Column in Table
- TCL Commands in SQL
- Truncate Query, Drop and Rename Query in SQL
- All DML Statement in SQL, Select Statement, Delete, Insert and Update Statement
- Select Statement or Select Query in SQL Explained with Examples
- Distinct Keyword Explained in SQL
- WHERE Statement or WHERE Clause in SQL Statement Explained
- AND & OR Operators in SQL
- LIKE Operator in SQL
- ORDER BY Clause Sorting Explained in SQL
- Group By Clause in SQL
- Having Clause Explained in SQL
- SQL Constraints
- SQL Aggregate Functions
- SQL Aliases Use and Purpose in SQL
- SQL Joins Types, Use and Purpose
- SQL Sequence Syntax and Use with Examples
- SQL View
- SET Operation in SQL, UNION, UNION ALL, Intersect and Minus