SOL-C01 · Question #5
SOL-C01 Question #5: Real Exam Question with Answer & Explanation
The correct answer is A: CREATE DATABASE SALES DATA;. Option A creates the database. Initially, 'ACCOUNTADMIN' role has ownership and thus can modify it. Options B, C, and E are valid syntax but do not explicitly restrict initial modification access to only `ACCOUNTADMIN' post-creation. Option D is invalid syntax as OWNER cannot be
Question
A data engineer needs to create a new database named `SALES DATA in Snowflake. They want to ensure that only users with the 'ACCOUNTADMIN' role can initially modify the database. After creation, they will grant specific privileges to other roles. Which of the following SQL statements is the most appropriate way to create the database with these requirements?
Options
- ACREATE DATABASE SALES DATA;
- BCREATE OR REPLACE DATABASE SALES DATA;
- CCREATE DATABASE SALES DATA WITH DATA RETENTION TIME IN DAYS-I;
- DCREATE DATABASE SALES DATA WITH OWNER = 'ACCOUNTADMIN';
- ECREATE DATABASE SALES DATA COMMENT = 'Sales Data Database';
Explanation
Option A creates the database. Initially, 'ACCOUNTADMIN' role has ownership and thus can modify it. Options B, C, and E are valid syntax but do not explicitly restrict initial modification access to only `ACCOUNTADMIN' post-creation. Option D is invalid syntax as OWNER cannot be specified during database creation. Permissions are managed separately using GRANT statements after creation.
Topics
Community Discussion
No community discussion yet for this question.