Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: column update order
What's in a namespace wrote:
> "Charles Hooper" <hooperc2000_at_yahoo.com> schreef in bericht
> news:1164081790.296669.285220_at_f16g2000cwb.googlegroups.com...
> > Charles Hooper wrote:
> >> An individual UPDATE, INSERT, or DELETE will be consistent as of the
> >> time the DDL begins, as will a SELECT. Additionally, within a
> >> transaction, all SELECTs, UPDATEs, INSERTs, and DELETEs will be
> >> consistent as of the start of the transaction.
> >>
> >> Charles Hooper
> >> PC Support Specialist
> >> K&M Machine-Fabricating, Inc.
> >
> > Should state DML (manipulation) not DDL (definition), in case that
> > causes any confusion. DDL causes an implicit COMMIT.
> >
> > Charles Hooper
> > PC Support Specialist
> > K&M Machine-Fabricating, Inc.
> >
>
> Charles,
>
> I may have overlooked something, but I still don't understand why the column
> OLD_DATE is filled with sysdate in the first example, and filled correctly
> in the second example, for in both cases you did:
>
> UPDATE
> T4
> SET
> O_DATE=C_DATE,
> C_DATE=TRUNC(SYSDATE);
>
> Thanks,
>
> Shakespeare
This does not work as expected:
UPDATE
T4
SET
OLD_DATE=CURRENT_DATE,
CURRENT_DATE=TRUNC(SYSDATE);
This _does_ work as expected:
UPDATE
T4
SET
OLD_DATE=T4.CURRENT_DATE,
CURRENT_DATE=TRUNC(SYSDATE);
SELECT
*
FROM
V$RESERVED_WORDS
WHERE
KEYWORD='CURRENT_DATE';
KEYWORD RESERVED CURRENT_DATE N
Charles Hooper
PC Support Specialist
K&M Machine-Fabricating, Inc.
Received on Tue Nov 21 2006 - 06:16:34 CST
![]() |
![]() |