SQL 服务器何时提供行级安全性?

When is row level security supplied with SQL Server?

如果您有一个包含子查询、联接等的复杂查询,行级安全性是在 SQL 执行期间应用还是在最终结果集上应用?

访问数据时,会评估行级安全性 (RLS)。请参阅每次尝试从任何层访问数据时,数据库系统都会应用访问限制。

The access restriction logic is located in the database tier rather than away from the data in another application tier. The database system applies the access restrictions every time that data access is attempted from any tier. This makes your security system more reliable and robust by reducing the surface area of your security system.

根据http://sharewithpals.com/articles/637dd719/Steps-to-configure-row-level-security-in-SQL-Server-2016

While executing the select statement the rows are filtered based on the executing context of the query.

根据https://www.sqlshack.com/introduction-to-row-level-security-in-sql-server/

Row-Level Security in SQL Server is used to restrict the users at the database level rather than handling the restrictions at the application level. This access control is applied by the database every time a query is executed on the table irrespective of any application tier.