SOL-C01 · Question #61
SOL-C01 Question #61: Real Exam Question with Answer & Explanation
The correct answer is A: DATA MART, PUBLIC, ANALYST, REPORTING WH. CURRENT DATABASE()' and CURRENT will return the default database and schema for the user's session, which are 'DATA_MART' and 'PUBLIC' respectively. returns the currently active role, 'ANALYST , and 'CURRENT returns the currently used warehouse,
Question
A user executes the following SQL command in Snowflake: `SELECT CURRENT DATABASE(), CURRENT SCHEMA(), CURRENT ROLE(), CURRENT The user's current role is , and they are connected to the 'REPORTING WH' warehouse. Before executing this command, the default schema for the user was set to 'PUBLIC' within the 'DATA MART database. What will be the result of this query?
Options
- ADATA MART, PUBLIC, ANALYST, REPORTING WH
- BNULL, NULL, ANALYST, REPORTING WH
- CCurrent database, Current schema, ANALYST, REPORTING WH
- DEmpty string, Empty string, ANALYST, REPORTING_WH
- EAn error will occur because no database or schema context is explicitly set in the session.
Explanation
CURRENT DATABASE()' and CURRENT will return the default database and schema for the user's session, which are 'DATA_MART' and 'PUBLIC' respectively. returns the currently active role, 'ANALYST , and 'CURRENT returns the currently used warehouse,
Topics
Community Discussion
No community discussion yet for this question.