Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6770223
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T15:17:12+00:00 2026-05-26T15:17:12+00:00

Suppose, on the SQL prompt in Oracle 9i, I’m creating a simple table say

  • 0

Suppose, on the SQL prompt in Oracle 9i, I’m creating a simple table say orderStatus with only two columns with the following CREATE SQL command.

CREATE TABLE orderStatus(statusID varchar2(6) primary key, status varchar2(15));

just then I’m entering four rows with the following INSERT INTO commands.

INSERT INTO orderStatus VALUES("S0001", "Fulfilled");

INSERT INTO orderStatus VALUES("S0002", "Back order");

INSERT INTO orderStatus VALUES("S0003", "In process");

INSERT INTO orderStatus VALUES("S0004", "Cancelled");

On successful execution of the above commands, I’m issuing a COMMIT command to complete the current transaction.

COMMIT;

just then I need to fire the following DELETE command.

DELETE FROM orderStatus WHERE statusID="S0004";

which deletes one row with the statusID S0004. The table now contains only 3 rows.


Suppose, I need to add the NOT NULL constraint to the status column which requires the following ALTER TABLE command.

ALTER TABLE orderStatus MODIFY(status varchar(15) NOT NULL);

The table orderStatus will be altered to add a NOT NULL constraint to the status column.


Now, suppose I execute a ROLLBACK command on the SQL prompt which causes the current transaction to finish with all the data which are previously affected in this table to be undone. With this, the previously deleted row with the DELETE command above should be undone and the table should now contain the original four rows but the effect of ROLLBACK can not be observed and the table would have only three rows. Why does this happen?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T15:17:12+00:00Added an answer on May 26, 2026 at 3:17 pm

    DDL (CREATE TABLE and ALTER TABLE, for example) issues an implicit commit before the statement is executed and after the statement completes. You cannot roll back DDL and you cannot roll back DML changes (like your DELETE) after the implicit commits your DDL causes.

    This is why you do not generally want to mix DDL and DML.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Suppose a tree structure is implemented in SQL like this: CREATE TABLE nodes (
How do you do SQL query for the following condition? Suppose you have two
I use SQL Server 2000. Suppose I have two tables like the following: Area
Suppose I have a myTest.sql scripts, which contains thousands of create table blahblah statements.
I hope some one more SQL wise can help me. Suppose the following table
Suppose I have the two following Linq-To-SQL queries I want to refactor: var someValue1
I'm using SQL Server 2008; Suppose I have a table 'X' with columns 'Date1',
Suppose I have a table Orders in sql with 4 columns (OrderId int, ProductID
Suppose you have a table in SQL: Prices ------ 13.99 14.00 52.00 52.00 52.00
i am dynamically creating sql query for inserting multiple records in one hit.Suppose no

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.