开发者

Oracle - emulating a trigger on SELECT

(I had already written this question out when I figured out the answer, so I'll post it anyway since Google didn't give me any useful answers).

I'm looking to create something much like a trigger which fires on an Oracle SELECT. The goal is remove specific rows from the result of the SELECT depending which user is doing the SELECT.

This needs to work on the Standard Edition version of Oracle 11g (开发者_运维百科not Enterprise), so I don't have access to Row Level Security or Fine-Grained Auditing.

I've got an existing (very) legacy application which has thousands of embedded selects all over the place, so ideally I don't want to have to change every one...

The table I'm looking to work with has a million rows in it, which somewhat limits me from a performance perspective.


Since I was only really looking to modify the select on 1 particular table, the answer for me was to rename the existing table and create a view with the original name.


I think, simple if condition in PL SQL block can resolve your problem.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜