Returns the next connection number, or the first connection if the parameter is NULL.
NEXT_CONNECTION ( {NULL | connection-id } )
connection-id An integer, usually returned from a previous call to NEXT_CONNECTION. If connection-id is NULL, NEXT_CONNECTION returns the first connection ID.
The following statement returns an identifier for the first connection. The identifier is an integer value like 569851433.
SELECT NEXT_CONNECTION( NULL ) FROM iq_dummy
The following statement returns a value like 1661140050:
SELECT NEXT_CONNECTION( 569851433 ) FROM iq_dummy
You can use NEXT_CONNECTION to enumerate the connections to a database. To get the first connection, pass NULL; to get each subsequent connection, pass the previous return value. The function returns NULL when there are no more connections.