Row-level security is an access control mechanism that restricts which rows of a database table a user or role can access. Unlike traditional permissions granted on whole tables or columns, it returns only the rows each user is authorized to see, even when different users run the same query against the same table. Major database systems such as PostgreSQL, Microsoft SQL Server, and Oracle Database, as well as cloud data warehouses like Snowflake and BigQuery, offer this feature.
It is typically implemented by defining policies or filter predicates on a table, which the database then applies automatically to every query. Because unauthorized rows are usually omitted from results rather than triggering an error, programs and AI agents that interpret query results automatically need to distinguish an empty result caused by access restrictions from a genuine absence of data.