Thread: Transactions (Really Simple)

Transactions (Really Simple)

From
Marcelo Pereira
Date:
Hello all,

I would like to use transactions while inserting, deleting or updating
data from my database.

I have read the on-line documentation, but I would like some help.

How could I implement transaction feature to the `insert command' bellow?

-------------------------------
...... which command here?
insert into table1 (field11,field12) values ('value11','value12')
insert into table2 (field21,field22) values ('value21','value22')
...... which command here?
-------------------------------

Thanks in advance,

Marcelo Pereira


Re: Transactions (Really Simple)

From
Martijn van Oosterhout
Date:
On Tue, Feb 26, 2002 at 09:07:33AM -0300, Marcelo Pereira wrote:
> How could I implement transaction feature to the `insert command' bellow?
>
> -------------------------------
> ...... which command here?
begin;
> insert into table1 (field11,field12) values ('value11','value12')
> insert into table2 (field21,field22) values ('value21','value22')
> ...... which command here?
commit;
> -------------------------------

HTH,
--
Martijn van Oosterhout <kleptog@svana.org>
http://svana.org/kleptog/
> If the company that invents a cure for AIDS is expected to make their
> money back in 17 years, why can't we ask the same of the company that
> markets big-titted lip-syncing chicks and goddamn cartoon mice?