CONNECTION_ID()
This page is part of MariaDB's Documentation.
The parent of this page is: Functions for MariaDB Xpand
Topics on this page:
Overview
Returns the thread ID for the given connection.
USAGE
CONNECTION_ID()
DETAILS
CONNECTION_ID()
is an information function that returns the connection ID for the current connection.
The returned value is unique for each of the currently connected clients.
The returned value is the same as the ID
column of the INFORMATION_SCHEMA.PROCESSLIST
table and the same as the Id
column of SHOW PROCESSLIST
.
EXAMPLES
SELECT CONNECTION_ID();
+-----------------+
| CONNECTION_ID() |
+-----------------+
| 123456789 |
+-----------------+