DRAG DROP
You are maintaining a Microsoft SQL Server database named DB1. The database uses the dbo schema.
Tables in the database were created by running the following Transact-SQL statements:
The Sales table has a column named Managerid. This column is used to assign the manager for a sales transaction. You have read access to the Employees table. Other employees have read and write access to the Sales table but no access to the Employees table.
You need to implement row-level security (RLS) for the Sales table.
The solution must meet the following requirements:
– Managers must only read and modify sales records that are assigned to them.
– Managers cannot assign sales data to another manager.
Which three Transact-SQL segments should you use to develop the solution? To answer, move the appropriate Transact-SQL segments from the list of Transact-SQL segments to the answer area and arrange them in the correct order.
Answer:
Explanation:
References: https://docs.microsoft.com/en-us/sql/t-sql/statements/create-security-policy-transact-sql?view=sqlserver-2017 https://docs.microsoft.com/en-us/sql/t-sql/functions/database-principal-id-transact-sql?view=sqlserver-2017