Howard J. Rogers wrote:
> 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
Understood ... but DDL is NOT required to be the last statement in
a transaction. And I expect we would both agree that DDL doesn't
belong anywhere in any transaction.
--
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu
(replace 'x' with 'u' to respond)
Received on Thu Nov 18 2004 - 10:01:33 CST