SOL-C01 · Question #81
You have created a new database named 'DEV DB' and want to grant the "SELECT' privilege on all tables within this database to the 'ANALYST' role. You want to ensure that any new tables created in 'DEV
The correct answer is C. GRANT SELECT ON FUTURE TABLES IN DATABASE DEV DB TO ROLE ANALYST;. Option C uses Snowflake's FUTURE GRANTS syntax correctly - ON FUTURE TABLES IN DATABASE tells Snowflake to automatically apply the SELECT privilege to any table created in DEV DB going forward, satisfying both requirements (current and future coverage when combined with a separat
Question
You have created a new database named 'DEV DB' and want to grant the "SELECT' privilege on all tables within this database to the 'ANALYST' role. You want to ensure that any new tables created in 'DEV DB' in the future automatically grant 'SELECT' to the 'ANALYST' role. Which of the following approaches achieves this?
Options
- AGRANT SELECT ON ALL TABLES IN DATABASE DEV DB TO ROLE ANALYST;
- BGRANT FUTURE GRANTS SELECT ON DATABASE DEV DB TO ROLE ANALYST;
- CGRANT SELECT ON FUTURE TABLES IN DATABASE DEV DB TO ROLE ANALYST;
- DGRANT SELECT ON DATABASE DEV DB TO ROLE ANALYST; ALTER DATABASE DEV DB
- EALTER DATABASE DEV DB SET GRANTED PRIVILEGES = 'SELECT' TO ROLE ANALYST;
How the community answered
(23 responses)- A9% (2)
- B13% (3)
- C74% (17)
- D4% (1)
Explanation
Option C uses Snowflake's FUTURE GRANTS syntax correctly - ON FUTURE TABLES IN DATABASE tells Snowflake to automatically apply the SELECT privilege to any table created in DEV DB going forward, satisfying both requirements (current and future coverage when combined with a separate ALL TABLES grant).
Why the others fail:
- A grants
SELECTon all currently existing tables only - new tables created later will not inherit it, so it's a one-time snapshot, not a forward-looking policy. - B uses invented syntax (
FUTURE GRANTS SELECT) that does not exist in Snowflake; the correct keyword order isON FUTURE TABLES. - D attempts to grant
SELECTat the database object level, which does not cascade down to tables, and the statement is incomplete/invalid. - E is entirely fabricated syntax - Snowflake has no
SET GRANTED PRIVILEGESclause onALTER DATABASE.
Memory tip: Think of the word "FUTURE" as a time arrow pointing forward - ON FUTURE TABLES means "every table born after this moment." Pair it with ON ALL TABLES if you also need existing tables covered, since FUTURE alone only applies to what hasn't been created yet.
Topics
Community Discussion
No community discussion yet for this question.