CONNECTION_ID
Syntax
CONNECTION_ID()
Description
Returns the connection ID for the connection. Every connection (including events) has an ID that is unique among the set of currently connected clients.
Until MariaDB 10.3.1, returns MYSQL_TYPE_LONGLONG, or bigint(10). From MariaDB 10.3.1, returns MYSQL_TYPE_LONG, or int(10).
Examples
SELECT CONNECTION_ID();
+-----------------+
| CONNECTION_ID() |
+-----------------+
| 3 |
+-----------------+
See Also
This page is licensed: GPLv2, originally from fill_help_tables.sql
Last updated
Was this helpful?