MySQL Tutorial/Information Functions/CONNECTION ID

Материал из SQL эксперт
Перейти к: навигация, поиск

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>