Skip to main content

Posts

Showing posts with the label auto commit

Question: 14: Drop Table - Dependency

Evaluate the SQL statement DROP TABLE DEPT Which four statements are true of the SQL statement? A. You cannot roll back this statement. B. All pending transactions are committed. C. Al views based on the DEPT table are deleted. D. All indexes based on the DEPT table are dropped. E. All data in the table is deleted, and the table structure is also deleted. F.All data in the table is deleted, but the structure of the table is retained. G.All synonyms based on the DEPT table are deleted. Answer: A, B, D and E Explanation: A. You cannot roll back DROP TABLE statement. B. All pending transactions related on this table arecommitted. D. If the table is dropped, Oracle automatically drops any index, trigger and constraintassociated with the table as well. E. All data in the table is deleted, and the table structure is also deleted. Incorrect Answers C: All views based on the DEPT table become invalid, but they are not deleted. F: All data in the table is deleted, and the table structure is als...

Question 13: DDL and Commit

I have updated some tables and before commit if I will give one DDL command means what will happen? For example CREATE TABLE test(fldname number(10)); insert into test (fldname) values (10); insert into test (fldname) values (20); After that without giving Commit statement, I issued one DDL command CREATE TABLE test1( sno number(10)) What aobut the previous inserts? Is it committed or not? explain. Answer: I checked this and found the following 3 points. Point No. 1: If we give a DDL command with syntax error means it will not commit and gives the error. For example the following statement CREATE TABLE test(fldname number(10), ); note that the comma, gives "invalid identifier.. " error and without committing the INSERT statements. Point No. 2: If the given DDL command executes without any error means it will auto commit the INSERT statements. Point No. 3: If we give a DDL command without any syntax error and that statement not execute also auto commit the INSERT st...