Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: DDL
"Howard J. Rogers" <hjr_at_dizwell.com> wrote in message news:<419c730a$0$25115$afc38c87_at_news.optusnet.com.au>...
> DA Morgan wrote:
> > Howard J. Rogers wrote:
> >
> >> Rahul Jain wrote:
> >>
> >>> Why is DDL required to be the last statement in a transaction?
> >>
> >>
> >>
> >> Because there is an implicit commit before and after each and every
> >> DDL statement.
> >>
> >> Regards
> >> HJR
> >
> >
> > You are absolutely correct Howard ... but I fail to see what your answer
> > has to do with the question. But then its late and I'm tired.
>
>
> Well, I'm no developer, but I was always taught that a transaction
> starts with some piece of DML and ends when you say 'commit' (or
> rollback, of course).
>
> Insert money into new bank account;
> Delete money from old account;
> Commit both changes;
>
> If DDL implies a commit, surely that therefore must count as the
> termination of a transaction? And therefore by definition, the DDL
> statement becomes the last statement in a transaction.
>
> Insert money into new bank account;
> Delete money from old account;
> Drop table EMP;
>
> ...which achieves exactly the same thing as before.
>
> Since both you and Richard appear to agree that a piece of DDL is not
> necessarily the last statement in a transaction, I guess I must be
> missing something. Enlightenment from either would therefore be appreciated.
>
> Rgrds
> HJR
The ambiguity arises because the OP can be reparsed as "The last
statement in a transaction is required to be DDL." There is no other
context to prevent this. In addition, the "why" could be read as a
deeper question than reinterpreting it as "How come," the latter which
elicits answers like "because that's how Oracle works, deal with it."
In other words, why, really, does DDL require commits before and
after, shouldn't atomicity make that unnecessary?
I would guess the OP uses a dialect of English that is neither
American nor English, and so wouldn't necessarily be expected to see
any of this as those who do.
http://en.wikipedia.org/wiki/Indian_English#.22An_Indian_English_Grammar.22
jg
-- @home.com is bogus. "I'm going to use good judgment. I haven't lost my temper in 40 years, but pilgrim you caused a lotta trouble this morning... mighta got somebody killed... and somebody otta belt you in the mouth... but I won't... I won't... the hell I won't!" - John Wayne http://www.signonsandiego.com/uniontrib/20041118/news_1b18pilgrim.htmlReceived on Thu Nov 18 2004 - 15:43:35 CST
![]() |
![]() |