Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: column masking in 10g
That isn't very different from my example. You only need to provide
correct policy function,
e.g.
if (user in ('BOB'))
then
return null; --allow user to see content
else
return '1=0'; --do not show anything
end if;
On 3/2/07, David Boyd <davidb158_at_hotmail.com> wrote:
> Alexander and Chris,
>
> Thanks very much for your quick response to share your code with me. What
> I'm looking for is the code that does not involve the row level security.
> Here is the example.
>
> SQL> create table col_masking
> 2 (
> 3 n number,
> 4 data varchar2(100)
> 5 );
>
> Table created.
>
> SQL> insert into col_masking
> 2 select level, to_char(level)
> 3 from dual
> 4 connect by level <= 10;
>
> 10 rows created.
>
> SQL> commit;
>
> Commit complete.
>
> SQL> select * from col_masking;
>
> /* for users that have privilege to see the column data*/
>
> N DATA
> ---------- -----
> 1 1
> 2 2
> 3 3
> 4 4
> 5 5
> 6 6
> 7 7
> 8 8
> 9 9
> 10 10
>
> 10 rows selected.
>
> /* for users that don't have privilege to see the column data*/
>
> N DATA
> ---------- -----
> 1
> 2
> 3
> 4
> 5
> 6
> 7
> 8
> 9
> 10
>
> 10 rows selected.
>
> Dave
>
> _________________________________________________________________
> Play Flexicon: the crossword game that feeds your brain. PLAY now for FREE.
> http://zone.msn.com/en/flexicon/default.htm?icid=flexicon_hmtagline
>
>
-- Alexander Fatkulin, Senior Oracle DBA -- http://www.freelists.org/webpage/oracle-lReceived on Thu Mar 01 2007 - 10:02:29 CST
![]() |
![]() |