Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: psql commit
In message <igig0255na98fbmu7abs6a9jtrb5v54pp7_at_4ax.com>, tony
<bigtoehere_at_hotmail.com> writes
>Thanks for the replies. The subject should say plsql....it was the
>end of a long day ; ) I'll try to explain my question more fully.
>
>BEGIN
> IF X = '1' THEN
> UPDATE mytable
> SET myfield = 1
> WHERE id=idIn;
>
> htp.print('Thank you!);
> ELSE
> htp.print('Operation failed')
> END IF;
>END
>
>Does the commit occur after the WHERE clause or not until END?
>
>thanks again,
>tony
>
At the very earliest at the end. There is no DDL in this, so as Daniel
Morgan said there is no implied commit. Whether or when it is committed
depends on the tool you are using to execute it.
1 In SQL*Plus with AUTOCOMMIT on, then the commit will occur after
the end.
2 In SQL*Plus with autocommit off, then the commit won't occur
until you exit sqlplus.
3 In JDBC with autocommit on, as 1 4 IN JDBC with autocommit off, then there will be no commit unless you explicitly issue a commit; 5 ODBC I think the same as JDBC 6 OCI/Pro*C no commit unless you explicitly issue a commit.
-- Jim Smith I'm afraid you've mistaken me for someone who gives a damn.Received on Fri Mar 03 2006 - 09:14:15 CST