content_image/865229.jpg
• COERCIBILITY( str ) 

Returns the collation coercibility value of the string argument. 

mysql> SELECT COERCIBILITY(’abc’ COLLATE utf8_swedish_ci); -> 0 mysql> SELECT COERCIBILITY(USER()); -> 3 mysql> SELECT COERCIBILITY(’abc’); -> 4 mysql> SELECT COERCIBILITY(1000); -> 5 

-> ’utf8’ 

The return values have the meanings shown in the following table. Lower values have higher precedence. 

<img src='content_image/865229.jpg'>

For more information, see Section 10.8.4, “Collation Coercibility in Expressions” . 

• COLLATION( str ) 

Returns the collation of the string argument. 

mysql> SELECT COLLATION(’abc’); -> ’utf8_general_ci’ mysql> SELECT COLLATION(_utf8mb4’abc’); -> ’utf8mb4_0900_ai_ci’ mysql> SELECT COLLATION(_latin1’abc’); -> ’latin1_swedish_ci’ 

• 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. 

mysql> SELECT CONNECTION_ID(); 

