Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: column masking in 10g

Re: column masking in 10g

From: Jason Heinrich <jheinrich_at_pcci.edu>
Date: Thu, 01 Mar 2007 09:54:27 -0600
Message-ID: <C20C5353.19D13%jheinrich@pcci.edu>


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
>



Jason Heinrich
Oracle Database Administrator
Pensacola Christian College
(850) 478-8496 x2509
jheinrich_at_pcci.edu
--
http://www.freelists.org/webpage/oracle-l
Received on Thu Mar 01 2007 - 09:54:27 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US