equivalent of @@TRANCOUNT mysql

Posted on 2008-11-16
Last Modified: 2012-05-05
Hi,we are migrating iue db from mssql to mysql.
i have a procedure where they have used
please tell me the equivalent of @@TRANCOUNT in mysql
Question by:vijji_lakshmi
    LVL 26

    Expert Comment

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

    SELECT COUNT(*) AS OpenQuestions from EE;

    This should give you the answer for your question....
    LVL 142

    Expert Comment

    by:Guy Hengel [angelIII / a3]
    MySQL does not have such equivalent.
    LVL 26

    Expert Comment

    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     |

    Author Comment

    Hi ushastry,
    what is EE here??
    LVL 26

    Accepted Solution


    Sorry I just wrote bcoz I noticed that you have lots of open questions and you didn't close(some 30+ open questions and which is not a good sign).. Why I'm telling you is lost of ppl help here to earn some points and when they notice that you don't close questions then they hardly try to attempt your questions..

    EE means Experts-Exchange.

    Coming to your question - unfortunately MySQL don't provide such variables @@TRANCOUNT as for as I know..


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    Loading csv or delimited data files to MySQL database is a very common task frequently questioned about and almost every time LOAD DATA INFILE comes to the rescue. Here we will try to understand some of the very common scenarios for loading data …
    Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL ( several years ago, it seemed like now was a good time to updat…
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now