Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: column masking in 10g
Good idea. The advantage to this approach is that all users are presented
with the same view definition, so you donšt have to deal with the missing
column in any programs that access it.
On 3/1/07 9:20 AM, Bill Ferguson wrote:
> You could also create a view with the CASE statement, similar to:
>
> CREATE OR REPLACE FORCE VIEW TEST1 ("COL_A", "COL_B", "COL_C") AS
> select col_a, col_b,
> case (user) when 'XYZ' then null
> else col_c end col_c
> from your_table;
>
>
> You can handle the "user" part various ways, have a table of restricted users,
> etc. to select from, just manually add their names to the list, etc. Or, you
> may have other things to check for as well.
>
> If the condition is met, col_c returns a null, if the condition is not met,
> then col_c returns the value for that column. I've tested this on 10gR2, I
> don't know how other versions will work.
>
> -- Bill Ferguson
>
-- http://www.freelists.org/webpage/oracle-lReceived on Thu Mar 01 2007 - 09:54:27 CST
![]() |
![]() |