:)
Yep, a view with a dummy value for email address for the communication process is probably the way to go.
Or - if you're lucky enough to have the Advanced Security Option - you could use Data Redaction:
create table t (
c1 int,
email varchar2(100),
stuff varchar2(100)
);
insert into t values ( 1, 'student1@test.com', 'blah' );
insert into t values ( 2, 'student2@test.com', 'blah' );
commit;
select * from t;
C1 EMAIL STUFF
1 student1@test.com blah
2 student2@test.com blah
begin
dbms_redact.add_policy(
object_schema => user,
object_name => 't',
column_name => 'email',
policy_name => 'redact_email',
function_type => dbms_redact.regexp,
regexp_pattern => '.*@.*',
regexp_replace_string => 'test@test.com',
regexp_occurrence => dbms_redact.re_all,
expression => '1=1'
);
end;
/
grant create session to u identified by u;
grant select on t to u;
conn u/u
select * from chris.t;
C1 EMAIL STUFF
1 test@test.com blah
2 test@test.com blah
Note the policy doesn't apply if your user has the "EXEMPT REDACTION POLICY" privilege. Which the DBA role has.