How to view current schema search path in a h2 database?
-
31-05-2021 - |
Frage
When connecting to an h2 database, the default search path is set to public
.
You can alter it with the SET SCHEMA_SEARCH_PATH
.
But if you alter it multiple times, at some point how can you view its current content?
I wasn't able to find some kind of commands like this VIEW SCHEMA_SEARCH_PATH
or SHOW SCHEMA_SEARCH_PATH
.
Typing them give me error messages.
Lösung
It's a bit a hack, but you could use:
SELECT * FROM INFORMATION_SCHEMA.SESSION_STATE
WHERE KEY='SCHEMA_SEARCH_PATH'
Andere Tipps
Non-hack solution: SELECT SCHEMA()
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow