dbTalk Databases Forums  

SQL BEFORE puzzle

comp.databases.theory comp.databases.theory


Discuss SQL BEFORE puzzle in the comp.databases.theory forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Roy Hann
 
Posts: n/a

Default SQL BEFORE puzzle - 07-31-2008 , 11:18 AM






This is not a theory question by any means, but perhaps there is someone
hanging out here who is able to speak with authority on SQL. We are
trying to figure out the justification for why a BEFORE trigger should
be prevented from doing any updates. The wording we're looking at from
the standard is:

"If the trigger is a BEFORE trigger and if, before the completion of the
execution of any <SQL procedure statement> simply contained in triggered
SQL statements, an attempt is made to execute an SQL-data change
statement or an SQL-invoked routine that possibly modifies SQL-data,
then an exception condition is raised: prohibited statement encountered
during trigger execution."

Obviously one shouldn't expect to be able to update a row that doesn't
exist yet, but why prevent all updates (to other rows, other tables)?

--
Roy

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.