SnowPro Core Certification — Question 1173
Which command will change the name of shared database role r1 to r4?
Answer options
- A. ALTER ROLE d1.r1 RENAME TO d1.r4;
- B. ALTER ROLE d1.r1 RENAME TO d2.r4;
- C. ALTER DATABASE ROLE d1.r1 RENAME TO d2.r4;
- D. ALTER DATABASE ROLE d1.r1 RENAME TO d1.r4;
Correct answer: D
Explanation
The correct command is option D, as it properly uses the ALTER DATABASE ROLE syntax to rename the role from d1.r1 to d1.r4 within the same database. Option A is incorrect because it uses ALTER ROLE instead of ALTER DATABASE ROLE, while options B and C incorrectly point to a different database (d2) instead of the correct one (d1).