Transactions (Really Simple)

Started by Marcelo Pereiraabout 24 years ago2 messagesgeneral
Jump to latest
#1Marcelo Pereira
gandalf@sum.desktop.com.br

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

#2Martijn van Oosterhout
kleptog@svana.org
In reply to: Marcelo Pereira (#1)
Re: Transactions (Really Simple)

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/

Show quoted text

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?