DCL command

Data Control Language(DCL) is used to control privilege in Database. To perform any operation in the database, such as for creating tables, sequences or views we need privileges. Privileges are of two types,

System : creating session, table etc are all types of system privilege.
Object : any command or query to work on tables comes under object privilege.

DCL defines two commands,

Grant : Gives user access privileges to database.
Revoke : Take back permissions from user.

To Allow a User to create Session

grant create session to username;


To Allow a User to create Table

grant create table to username;

To provide User with some Space on Tablespace to store Table

alter user username quota unlimited on system;

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

Quantitative Aptitude
Reasoning
Programming
Interview