QA

Team-Fly    

 
Sams Teach Yourself SQL in 24 Hours, Third Edition
By Ronald R. Plew, Ryan K. Stephens
Table of Contents
Hour 6.  Managing Database Transactions


Q&A

Q1:

Is it necessary to issue a commit after every INSERT statement?

A1:

No, absolutely not. If you were inserting a few hundred thousand rows into a table, a COMMIT would be recommended every 5,00010,000 rows, depending on the size of the temporary rollback area (seek the advice of your database administrator). Remember that the database may freeze up or not function properly when the rollback area fills up.

Q2:

How does the ROLLBACK command undo a transaction?

A2:

The ROLLBACK command clears all changes from the rollback area.

Q3:

If I issue a transaction and 99 percent of the transaction completes but the other 1 percent errs, will I be able to redo only the error part?

A3:

No, the entire transaction must succeed; otherwise , data integrity is compromised.

Q4:

A transaction is permanent after I issue a COMMIT, but can't I change data with an update?

A4:

Permanent used in this matter means that it is now a part of the database. The UPDATE statement can always be used to make modifications or corrections to the data.


Team-Fly    
Top
 


Sams Teach Yourself SQL in 24 Hours
Sams Teach Yourself SQL in 24 Hours (5th Edition) (Sams Teach Yourself -- Hours)
ISBN: 0672335417
EAN: 2147483647
Year: 2002
Pages: 275

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net