MySQL Tutorial/Information Functions/CONNECTION ID
Версия от 13:44, 26 мая 2010; (обсуждение)
CONNECTION_ID() returns the connection ID (thread ID) for the connection.
Every connection has an ID that is unique among the set of currently connected clients.
mysql>
mysql> SELECT CONNECTION_ID();
+-----------------+
| CONNECTION_ID() |
+-----------------+
| 37 |
+-----------------+
1 row in set (0.00 sec)
mysql>