Reputation: 63
In oracle userenv('LANG') is used to get the language but not sure how to achieve the same in snowflake. tried select SYS_CONTEXT('USERENV', 'LANGUAGE') as well not working. please help me with this
Upvotes: 0
Views: 431
Reputation: 1695
I am not sure if it is the same thing as in Oracle, but Snowflake has a session parameter "LANGUAGE" applied to the current user's session.
You can get it as:
show parameters like 'LANGUAGE' in session;
if you need to extract just a value, you need to use the result_scan method to select the desired column:
select $2 as LANGUAGE from table(result_scan(last_query_id()));
Output:
Upvotes: 2