Link to home
Start Free TrialLog in
Avatar of vijji_lakshmi
vijji_lakshmi

asked on

equivalent of @@TRANCOUNT mysql

Hi,we are migrating iue db from mssql to mysql.
i have a procedure where they have used
@@TRANCOUNT ;
please tell me the equivalent of @@TRANCOUNT in mysql
rgds,
vijji
Avatar of Umesh
Umesh
Flag of India image

very simple...........

SELECT COUNT(*) AS OpenQuestions from EE;


This should give you the answer for your question....
Avatar of Guy Hengel [angelIII / a3]
MySQL does not have such equivalent.
Agree with Agelll, MySQL don't provide per connection stats such as "number of active transactions for the current connection.".. but you get a count of running threads which are not sleeping...

mysql> show status like 'Threads_running';
+-----------------+-------+
| Variable_name   | Value |
+-----------------+-------+
| Threads_running | 1     |
+-----------------+-------+
Avatar of vijji_lakshmi
vijji_lakshmi

ASKER

Hi ushastry,
what is EE here??
rfds,
vijji
ASKER CERTIFIED SOLUTION
Avatar of Umesh
Umesh
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial