Subject Re: [firebird-support] SQL Statement that fired trigger?
Author Svein Erling Tysvaer
The one thing Martijn didn't mention, is that you can also get the OLD
and NEW values in your triggers, so even though you cannot get the exact
statement, you can know exactly what has changed.

Moreover, you can have separate triggers for UPDATE, DELETE and INSERT
if you want to, it is only recently it has become possible to mix them.

You probably knew all this already, I just thought it was worth mentioning.

Set

bakasanchi wrote:
> --- In firebird-support@yahoogroups.com, "Martijn Tonies" wrote:
>>
>>> I would like to know if someone knows of a way to get the SQL
>>> statement that caused a trigger to fire?
>> You cannot, you can only know if it's an insert, delete or update
>> statement.
>>
>> Martijn Tonies
>> Database Workbench - tool for InterBase, Firebird, MySQL, NexusDB,
>> Oracle & MS SQL Server
>> Upscene Productions
>> http://www.upscene.com
>> My thoughts:
>> http://blog.upscene.com/martijn/
>> Database development questions? Check the forum!
>> http://www.databasedevelopmentforum.com
>>
> Are you sure there is absolutely no way? But please do share how to
> know if it's an insert, delete or update please.
>
> Thanks
> Anton