UrbanPro
true

Learn Oracle Database from the Best Tutors

  • Affordable fees
  • 1-1 or Group class
  • Flexible Timings
  • Verified Tutors

Search in

Must know fact about DDL

Gavi Y.
19/12/2016 0 0

Hello everyone,

This is again for beginners, as a Trainer, it's my duty to educate the beginners/learners. Let's take an example below,

--Assume we already have 'EMP' table with the columns-  id,name,Sal

Insert into Emp (id,name,sal) Values(1,'xyz',2200);

Create table test (Id number);

--Now check the contents of EMP in another session and you would that record is inserted even without committing. That is because there is a 'Create' statement after 'Insert', which is DDL and hence it auto commits the transaction.

-- Now try this in one of the sessions

Insert into Emp (id,name,sal) Values(2,'abc',1100); -- Inserts a record

Create table test (Id number); --This statement fails as 'test' already exists

--Don't commit anything here and check the contents of EMP in another session or rollback in the same session and check EMP table

 

So, how did that happen? If DDL got failed then who committed the transaction? It's a homework. Google it and find out.

0 Dislike
Follow 0

Please Enter a comment

Submit

Other Lessons for You

How does a SQL Query Execute inside Oracle? What are the steps followed in the background?
The above snapshot says it all. Hence it is said, 'Picture says it all'. Basically, there are 4-5 steps. There are two possible ways of query being executed. 1. Soft Parse- Improves performance....

SQL Subqueries - Used in various ways
If you master the concepts of subqueries, you would gain a lot of flexibility in writing complex SQL queries. Let's not get into Correlated subqueries, let us see the different versions of nested subquery...

Introduction to Performance tuning
What is Performance in general terms? Throughput per Input. For Eg: we keep saying, this bike has so and so much of mileage and all that. That is one of the parameters in measuring the performance of...

How to read and understand the Compilation errors?
Today, we will understand how to interpret the compile time erros and fix them. Don't confuse with runtime errors which is altogether a different subject called Exception Handling. Compilation erros are...

Interview questions based on "level", a pseudocolumn
1. Write a query to get the below output, 1 11 21 31 .. .. 91 2 12 22 32 .. .. 92 3 13 23 33 .. .. 93 .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. 10 20 30 40 ...
X

Looking for Oracle Database Classes?

The best tutors for Oracle Database Classes are on UrbanPro

  • Select the best Tutor
  • Book & Attend a Free Demo
  • Pay and start Learning

Learn Oracle Database with the Best Tutors

The best Tutors for Oracle Database Classes are on UrbanPro

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more