Curriculum
Course: SQL
Login

Curriculum

SQL

SQL References

0/80

MySQL Functions

0/139

SQL Server Functions

0/84

SQL Quick Ref

0/1
Text lesson

CONNECTION_ID

Example

Retrieve the unique connection ID for the current session.

SELECT CONNECTION_ID();

Definition and Usage

The CONNECTION_ID() function retrieves the unique connection ID assigned to the current connection.

Syntax

CONNECTION_ID()

Technical Details

Works in:

 From MySQL version 4.0