- Categories:
Context functions (General)
CURRENT_REGIONยถ
Returns the name of the region for the account where the current user is logged in.
For organizations that have accounts in multiple region groups, returns region_group.region
.
Syntaxยถ
CURRENT_REGION()
Argumentsยถ
None.
Examplesยถ
Show the current region:
SELECT CURRENT_REGION();Output:
+------------------+ | CURRENT_REGION() | |------------------| | AWS_US_WEST_2 | +------------------+
Show the current region when the current user is logged into an account in an organization that spans multiple region groups:
SELECT CURRENT_REGION();Output:
+----------------------+ | CURRENT_REGION() | |----------------------| | PUBLIC.AWS_US_WEST_2 | +----------------------+