Sales representatives in every region query one shared orders table. Each representative should see only orders from their own territory, and the filtering must happen inside the database so no application code changes. Which feature should be applied?
Show answer and explanation
Answer: B
Row-Level Security attaches a filter predicate to a table so the database returns only the rows matching the current user's context, such as territory or role. The engine enforces the predicate on every query, so the application does not need its own filtering logic. The feature restricts rows rather than columns and does not change how data is stored.
Why the other options are wrong
- A. Dynamic Data Masking changes how column values appear. It does not remove rows from a user's results, so out-of-territory rows would still be returned.
- C. Transparent Data Encryption encrypts files at rest. Authorized connections still read every row, so it provides no territory-based filtering.
- D. Always Encrypted protects selected column values from administrators. It does not decide which rows a sales representative may query.