
Answer-first summary for fast verification
Answer: grant SELECT on all tables in schema DB1.SCHEMA to role MYROLE;, grant SELECT on future tables in schema DB1.SCHEMA to role MYROLE;
The question requires granting SELECT privileges on both existing and future tables in a specific schema. Option C (GRANT SELECT ON ALL TABLES IN SCHEMA DB1.SCHEMA TO ROLE MYROLE;) grants SELECT access to all current tables in the schema. Option D (GRANT SELECT ON FUTURE TABLES IN SCHEMA DB1.SCHEMA TO ROLE MYROLE;) grants SELECT access to all tables that will be created in the future in that schema. Together, these two commands fulfill the requirement. Options A and B grant USAGE privileges, which are insufficient for data selection. Options E and F grant privileges at the database level, which is broader than the required schema-level scope. The community discussion shows strong consensus (100% upvotes for CD) and references official Snowflake documentation confirming that C and D are the correct commands for this scenario.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
Which commands grant a role the privilege to SELECT from all existing and future tables in a schema? (Choose two.)
A
grant USAGE on all tables in schema DB1.SCHEMA to role MYROLE;
B
grant USAGE on future tables in schema DB1.SCHEMA to role MYROLE;
C
grant SELECT on all tables in schema DB1.SCHEMA to role MYROLE;
D
grant SELECT on future tables in schema DB1.SCHEMA to role MYROLE;
E
grant SELECT on all tables in database DB1 to role MYROLE;
F
grant SELECT on future tables in database DB1 to role MYROLE;