Skip to content

CONNECTION_ID

SELECT CONNECTION_ID();
+-----------------+
| CONNECTION_ID() |
+-----------------+
| 3296 |
+-----------------+

In the provided example, CONNECTION_ID() function is used, which returns the connection ID for the current connection. In this case, the returned connection ID is 3296.