tags:

views:

209

answers:

2

Is there a way to retrieve a transaction ID inside a MySQL trigger?

+3  A: 

Currently, no. It's been an open request for four years. However, you can use connection_id() which will give the connection session, so you can group things by that.

Eric
+1  A: 

But how can we get sql statement for this connectionid?

like for sql server we can get from dbcc inputbuffer(@@spid)

How can it with Mysql?

Paresh