Skip to main content

Posts

Create a sequence in Oracle with clear explanation

Introduction to Create a Sequence in Oracle As we discussed the schema objects in the previous session, so in this session that we are going to see one of the schema objects. This is very important topic that most of the interview questions are comes from here. At the end of this session, you will be very clear about the below topics related to the sequence: What is Sequence in Oracle ? Importance of creating sequence in Oracle Syntax for creating sequence in Oracle Data Dictionary for sequences. How to reset the sequence in Oracle ? How to alter the sequence in Oracle ? How to drop the sequence in Oracle ? NOTE : Answer the Interview Questions at the end of the article What is Sequence in Oracle ? Sequence is a numeric value generator which is used to generate the numbers in a sequential order by the incremental order. It is mostly used to generate the primary key value. Importance of creating sequence in Oracle It is a schema Objects and it is also a sharable objects Can able to crea

Class 2.3 Statements in Oracle TCL

Statements in Oracle TCL Statements in Oracle TCL is one of the most important part in the subset of Oracle statements. TCL means Transaction Control Language. There is more chance that there will be a interview questions in this section. Before reading this article one should know more differences between DDL and DML commands which are already posted before. What is mean by Transaction ? Transaction means an event that takes place between two commit points, For example : In Retail words, the transaction means buying and selling any goods so that complete event is called as transaction. What is mean by Failed Transaction ? Failed Transaction means thus that event is failed to achieve the commit point after the event starts. For example: If you sending any amount in online transaction means due to some technical issues there will be failed to achieve the commit points in other side so that event is called as failed transaction. This TCL is mainly related to the above two questions onl

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

Class 2.1 Statements in Oracle DML

Statements in Oracle DML In this session that we are going to see about statements in oracle DML (Data Manipulation Language). So it's better to read the post of Class 2 Statements in Oracle DDL , after read this article. DML => Data Manipulation Language. Difference Between statements in Oracle DDL and DML Data Define Language Data Manipulation Language It is used to build the structure for the table It is used to change or add the data in the form of records  It is an Auto Commit Statement, so wherever we use DDL it will get committed and save the transaction. It is a Manual Commit Statement, so manually we should commit the statements else it will rollback to the implicit save point. As per the Performance wise it has more speed than DML. Performance wise DML is slow because it makes the transaction to store in undo table space until we giving commit for that particular transaction If any changes happen it will affect the structure of the table. If any changes happen it means