tags:

views:

544

answers:

2

What is the equivalent to the following SQL Server statements in DB2?

  • Begin Transaction
  • Commit Transaction
  • Rollback Transaction
A: 

If you Google it you will get 100's of hits

Jim Evans
and now the answer is on Stack Overflow. Thanks!
Bo Schatzberg
If you want to get real about it - Transaction processing is not platform dependent. It is part of ANSI Standard SQL. ALL of the large DBMS's support it including Oracle, DB2, SQL Server, Ingress and many others. Thay all support ANSI Standard SQL so you can write platform independent SQL code. Having said that - they all usually add their own extensions to enhance the functionality that the ANSI Standard code provides so you can also go that route to add the extra bells and whistles.
Jim Evans
+2  A: 

See here for an example. But basically

BEGIN TRANSACTION
COMMIT TRANSACTION
ROLLBACK
Preet Sangha