This tutorial explains how to use the MySQL CONNECTION_ID function with syntax and examples.
The MySQL CONNECTION_ID function returns the connection ID for the current connection, which is a unique ID among the currently connected clients.
The syntax for the CONNECTION_ID function in MySQL is:
There are no parameters or arguments for the CONNECTION_ID function in MySQL.
The CONNECTION_ID function can be used in the following versions of MySQL:
Let's look at some MySQL CONNECTION_ID function examples and explore how to use the CONNECTION_ID function in MySQL.
For example:
Since the CONNECTION_ID function returns the unique ID for the current connection, t might display something like this:
In this case, the unique ID for the connection is 57.