Skip to main content

Class 2.2 Statements in Oracle DCL

Statements in Oracle DCL

Statements in Oracle DCL is one of the subset in Oracle, DCL is Data Control Language, which is mainly used to get and give access to the other users.

data control language and data retrieval



In the previous session, that we have discussed about the DML (Data Manipulation Language), DDL (Data Define Language), to access those this DCL command is required. In other words we can say giving authorization to the objects and data which are stored in the database.

List of Commands of DCL

GRANT

REVOKE


GRANT => Grant is used to giving permission or privileges to other schema.

REVOKE => Revoking (removing) the permission that was given to any user or schema.

Syntax for DCL

GRANT

GRANT privileges ON Objects to schema;

For example: 

privileges :  SELECT, UPDATE, DELETE, INSERT
objects are : Table, view, Materialized views etc.

------ Updating permission in orders table for devuser2 schema.

GRANT UPDATE ON orders TO devuser2;

This grant permission is mainly used by the admin to give access only for the particular users.

REVOKE

REVOKE privileges ON objects to Schema;

----- Removing the privileges or access to the devuser2 schema

REVOKE UPDATE ON orders TO devuser2;

In order to remove or revoke the permission this Revoke command is used.

What are the types of Privileges are there in Oracle ?

Types of privileges that are used in Oracle are:
  • System Privileges
  • Object Privileges.
In system Privileges is used to control the access while creating any database objects and other admin related activities.

In object privileges is used to control the access while creating or changing any database objects by using various commands like Alter, Delete, Drop etc..,

Statements in Oracle Data Retrieval

Oracle Data Retrieval is one of the subset of Oracle statements.
  • SELECT

SELECT command is used to retrieve a data.

SELECT * FROM orders;

Selecting the records from the orders table.

CONCLUSION

I hope you can able to understand this two subset of oracle sql, which is data control language and data retrieval.

In the Interview part, this won't be much more important.

So, if you having any doubts in this article means kindly feel free to reach out us through contact form or official mail.


Comments

  1. Add this privilages, unlock the user privilage if it is locked means

    ReplyDelete

Post a Comment

Thanks for commenting, we will always respond your comment.

Popular posts from this blog

Oracle SQL Interview Questions Series 1 [Basic]

Oracle SQL Interview Questions Series - 1 Oracle SQL Interview Questions covered in Eduflee, so complete all the series to get placed into the IT company. At present Structured Query Language is very important to enter into the Software company. After completing all the Interview series, you can crack many interviews with 100% assurance from my experience. Basic Questions for SQL interview Schema => User Records => Rows Fields => Columns Result set => Output 1, What are the Schema Objects in Oracle SQL ?     Table, View, Materialized view, Sequence, Synonyms, Index are the schema objects in SQL.     Table => Basic Unit of Storage [Rows and Columns]     View => Logical Representation of subject of records, It does not contains any data. So here data is logical.     Materialized View =>   It contains the data, it is also called as Snapshot. It contains data physically.     Sequence => It is a Numeric Value Generator     Synonyms => used to provide alternate nam

Class 3 Functions in Oracle SQL

Functions in Oracle SQL Functions is one of the important features in Oracle SQL, with the help of this functions we can able to get the result as per our requirement. Functions in Oracle SQL contains Single Row Functions, Multiple Row Functions. Mainly those functions are used to returns value based on the input that which we given. And practicing this functions in oracle SQL, one can able to master in query writing. Functions is used to perform some actions like doing any calculations, grouping the data, conversion in type, date conversion etc. Types of Functions in Oracle SQL Functions in oracle is classified on the basis of the input which we are giving and getting the output, and they are: - Single Row Functions - Multiple Row Functions Single Row Functions in Oracle SQL Single Row Functions works on the single rows which will shows the result for that single rows only. If "n" number of inputs to give "n" number of outputs. From the above figure explains about

Learn SQL From Scratch to Advanced topics

Learn SQL from Scratch to Advanced  Nowadays, many IT company moreover depend on SQL  only. So this is one of the basic query language to start for new developers. So track or to be master in SQL, the below topics should be covered. List of Basic Topics :- 1, Should know what is frontend and backend developer  2, What is DBMS, RDBMS ? 3, What is SQL ? 4, What are the database are there ? Beginner Level SQL topics  This are some beginner level SQL topics, if you are new to SQL this are the topics that should be covered first. 1, Oracle Basics  2, List of Objects in SQL   3 , Clause and its usage   4, Functions  5, Sub Query  6, Joins  7, Decode and Case 8, Constraints 9, Important Data Dictionary Table like user_source, all_source, user_tables etc.., Intermediate Level SQL topics (Creating Objects)  When we are entering into objects this below topics should be covered. In  this topics that we are creating database objects like tables, views, sequences, synonyms etc. 1, Data Definitio