Specifies the role, warehouse, database, or schema to use for the current session.
USE commands¶For specific syntax, usage notes, and examples, see:
Viewing the current session context¶To view the current role, secondary roles, database, schema, and warehouse for the session, use the corresponding context functions. For example:
SELECT CURRENT_ROLE(), CURRENT_SECONDARY_ROLES(), CURRENT_WAREHOUSE(), CURRENT_DATABASE(), CURRENT_SCHEMA();
Copy
+----------------+--------------------------+---------------------+--------------------+------------------+ | CURRENT_ROLE() | CURRENT_SECONDARY_ROLES | CURRENT_WAREHOUSE() | CURRENT_DATABASE() | CURRENT_SCHEMA() | |----------------+--------------------------+---------------------+--------------------+------------------| | SYSADMIN | ALL | MYWH | MYTESTDB | PUBLIC | +----------------+--------------------------+---------------------+--------------------+------------------+
For more details, see Context functions.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4