- Categories:
Context functions (Session Object)
CURRENT_WAREHOUSE¶
Returns the name of the warehouse in use for the current session.
To specify a different warehouse for the session, execute the USE WAREHOUSE command.
Syntax¶
CURRENT_WAREHOUSE()
Arguments¶
None.
Examples¶
Show the current warehouse, database, and schema:
SELECT CURRENT_WAREHOUSE(), CURRENT_DATABASE(), CURRENT_SCHEMA();Output:
+---------------------+--------------------+------------------+ | CURRENT_WAREHOUSE() | CURRENT_DATABASE() | CURRENT_SCHEMA() | |---------------------+--------------------+------------------| | DEV_WAREHOUSE | TEST_DATABASE | UDF_TEST_SCHEMA | +---------------------+--------------------+------------------+