Hello Ramanan- First off, make sure you create tables of type InnoDB, Berkeley, or Gemini. [My]ISAM tables don't do transactions.
The simplest way to do a transaction is mysql> BEGIN; mysql> # successful edit mysql> COMMIT; or mysql> BEGIN; mysql> # failed edit, or dropped connection implies mysql> ROLLBACK; To create non-isam tables, append TYPE = InnoDB or similar to create statements. You can convert current tables using ALTER TABLE, but each type must be compiled in and setup in my.cnf One caveat: be sure all the tables affected are of one of the above types or you won't get a full rollback, leaving you in a crazy state with some badly updated tables (right guys? I think I read that in the docs a couple years ago). -jeff On Wed, 2003-03-26 at 22:33, [EMAIL PROTECTED] wrote: > Hi all, > > I want to execute a set of Insert,Update and Delete if any one of the > statement fails then I need to rollback all the statements. > > How do we achieve the same in MySQL. > > Thanks in advance. > > Ramanan > > -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]