【问题标题】:Is the first predicate in effect when I reference the first table after using a predicate to filter it, then in a second predicate on another table?当我使用谓词过滤后引用第一个表,然后在另一个表的第二个谓词中引用第一个谓词时,第一个谓词是否有效?
【发布时间】:2010-12-13 18:31:13
【问题描述】:

使用 Oracle VPD 工具(又名 RLS,又名 FGAC),假设我使用谓词

(WHERE) id = 'XXXX'

TableA 上,然后我使用谓词

(WHERE) col in (SELECT col From TableA)

TableB

TableA 是否会被过滤?当您查询表时,过滤是否仅在谓词定义之外进行? 我需要像这样在TableB 上做谓词吗?:

(WHERE) col in (SELECT col From TableA where id ='XXXX')

【问题讨论】:

    标签: oracle row-level-security


    【解决方案1】:

    是的,TableA 将使用您指定的谓词 (id = 'XXXX') 自动过滤。 如果满足过滤条件(参见 sec_relevant_cols),Oracle 会自动在您使用表的任何位置(在本例中为select from)应用过滤器,即使在子查询中也是如此。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-07-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多