Топ-100
 
CerebroSQL

CONNECTION_ID

База данных: MySQL

68747470733a2f2f7374796c65732e7265646469746d656469612e636f6d2f74355f32716d366b2f7374796c65

Topic

Syntax:
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.

The value returned by CONNECTION_ID() is the same type of value as
displayed in the ID column of the INFORMATION_SCHEMA.PROCESSLIST table,
the Id column of SHOW PROCESSLIST output, and the PROCESSLIST_ID column
of the Performance Schema threads table.

URL: https://dev.mysql.com/doc/refman/8.0/en/information-functions.html

Example

mysql> SELECT CONNECTION_ID();
-> 23786