Skip to Content
avatar image
Former Member

Is it possible to get the spid executing a trigger?

-- Sybase version : 15.7 --

Hi community,

I'd like to know if it's possible to retrieve the spid triggering a 'trigger' on a table?

As far as I understand, when you define a trigger you can access the deleted and inserted row through the deleted table and inserted table.

I'm interested in also finding the SPID responsible of those changes.

Is it something possible?

Thanks

S,

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Feb 01, 2017 at 03:52 PM

    Inside the trigger (where you've also got access to the inserted/deleted tables) just select @@spid.

    Add comment
    10|10000 characters needed characters exceeded