Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

As you do this exercise, please copy/paste query as well as the query result. This should help in answering the question provided. Please let me

As you do this exercise, please copy/paste query as well as the query result. This should help in answering the question provided. Please let me know if you need more information.

CREATE TABLE Cust ( Customer_number CHAR(3) PRIMARY KEY, Address VARCHAR(20), balance numeric(5,2)

);

INSERT INTO Cust VALUES (101,'14-153_varahagirinagar',2000.30); INSERT INTO Cust VALUES (102,'12/238_vizag',9000.30); INSERT INTO Cust VALUES (101,'13-123_vijayawada',200.30); INSERT INTO Cust VALUES (101,'1-43_varahagirinagar',4000.30); INSERT INTO Cust VALUES (101,'17-034_beach',1800.30);

SELECT * FROM Cust;

image text in transcribed

a. Create another table with the same types as Cust but without the customer address. Call this table Cust1. Use attribute names cnum for customer number and bal for balance. Load the table with the data you have in the Cust table with one less row. Use an INSERT INTO SELECT with appropriate attributes and an appropriate WHERE clause. b. Display the resulting table. If it appears ok, COMMIT your work. c. Assuming that you have COMMITted in step b, delete about half of your rows from Cust1 ("DELETE FROM Cust1 WHERE bal some value, etc.]). d. Show the table after you have deleted the rows. e. Undelete the rows with ROLLBACK. f. Display the table with the reinstated rows. g. Delete one row from the Cust1 table and SAVEPOINT point1. Display the table. h. Delete another row from the table and SAVEPOINT point2. Display the table. i. ROLLBACK to SAVEPOINT point1, display the table, and explain what is happening. j. Try to ROLLBACK to SAVEPOINT point2 and see what happens and explain it

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Information And Database Systems 6th Asian Conference Aciids 2014 Bangkok Thailand April 7 9 2014 Proceedings Part I 9 2014 Proceedings Part 1 Lnai 8397

Authors: Ngoc-Thanh Nguyen ,Boonwat Attachoo ,Bogdan Trawinski ,Kulwadee Somboonviwat

2014th Edition

3319054759, 978-3319054759

More Books

Students also viewed these Databases questions

Question

9. System creates a large, diverse talent pool.

Answered: 1 week ago