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...

Regular Expression in Oracle SQL

Regular Expression in Oracle SQL Regular Expression in Oracle SQL is a pattern matching technique to retrieve sort of data based on the conditions given in Oracle database. Pattern Matching is similar to functions like, replace, substring and in string which are previously seen topics. At the end of this article there will be certain task to practice for this Regular Expressions. It is very important to be very clear about this topic, this are very helpful for many interview Questions. Using regular expressions with Oracle Database: Overview Regular Expression is one of the easiest way to learn with clear understanding if one are familiar with the below Basic string matching patterns, Quantifiers, Meta characters, Functions etc. Note : The above points should understand clearly means it will be very easy to write a query. Basic String Matching with Regular Expressions | Either or  () Group \ Escape ^ Start $ Stop Literals of regular expression in oracle sql [ a b c ] a, b, c [...

Class 2 Statements in Oracle DDL

Statements in Oracle Statements in Oracle is very much important topic to understand rest other topics better, so there will be lot of important interview questions will be there in this chapter. This statements in Oracle is also called as Subset of oracle statements. Before entering in to the statements in oracle, everyone should know the basic understanding about Data types in Oracle  with that clear content will be much used to understand this subset concept will be easy to learn. Overview of Statements in Oracle At the end of this chapter you will get clear Understanding about the statements of oracle With the help of this statements, you can easily create database objects like Tables Able to create tables, columns, filling the data and merging and other privileges related parts will be seen here. DDL, DML , DCL , TCL are explained very well in this post.     POINTS TO REMEMBER: Always use underscore while naming any table or columns. Example: Instead of using custom...