|
Full redaction:对列中的数据全部redact
SQL> show user;
USER is "SZTECH"
SQL> select * from student;
STD_ID FIRST_NAME LAST_NAME PHONE_NUMBER
---------- ---------- ---------- -------------
1000 Steven King 137-5820-0888
1001 Anne Hathaway 130-9677-0491
1002 Taylor Swift 177-2345-6789
SQL> begin
2 dbms_redact.add_policy(
3 object_schema =>'SZTECH',
4 object_name =>'STUDENT',
5 policy_name =>'REDACT_STU_1',
6 column_name =>'LAST_NAME',
7 function_type =>DBMS_REDACT.full,
8 enable =>TRUE,
9 expression =>'1=1');
10 end;
11 /
PL/SQL procedure successfully completed.
SQL> select * from student;
STD_ID FIRST_NAME LAST_NAME PHONE_NUMBER
---------- ---------- ---------- -------------
1000 Steven 137-5820-0888
1001 Anne 130-9677-0491
1002 Taylor 177-2345-6789
SQL>
|
|