Home » Microsoft » 70-462 v.2 » Which statement should you execute first?
You have a SQL Server instance that uses database roles. The instance contains two databases named Customers and Sales.
A user named User1 has the required roles to access Customers.
You need to ensure that User1 can access Sales.
Which statement should you execute first?
A. ALTER ROLE…ADD MEMBER
B. CREATE USER
C. CREATE LOGIN
D. ALTER SERVER ROLE…ADD MEMBER
Correct Answer: A
Explanation/Reference:
The ALTER ROLE…ADD MEMBER command adds or removes members to or from a database role.
Example: This example creates a database role named Sales. It adds a database user named Barry to the membership.
CREATE ROLE Sales;
ALTER ROLE Sales ADD MEMBER Barry;
References: https://docs.microsoft.com/en-us/sql/t-sql/statements/alter-role-transact-sql