jeanlou1370
jeanlou1370

Reputation: 382

ConnectionID in HSQL

I'm looking for the id of the connection in hsqldb.

In oracle I use : SELECT Userenv('SESSIONID') from DUAL

In MySql I use : SELECT CONNECTION_ID()

In HSQL ?

Upvotes: 0

Views: 162

Answers (1)

fredt
fredt

Reputation: 24382

In HSQLDB 2.x, session is the same as the connection. You can use:

CALL SESSION_ID()

When Oracle syntax compatibility mode is used, you can also use:

SELECT SESSION_ID() FROM DUAL

And in MySql syntax compatibility mode:

SELECT SESSION_ID()

See the list of related functions here:

http://hsqldb.org/doc/2.0/guide/builtinfunctions-chapt.html#builtin_functions_sysfunc-sect

Upvotes: 2

Related Questions