Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Implementing row-level security.
Dear Sir,
I have a problem about implementing the row-level security. My situation is as follow :
I have a table : EMP_SALARY (EMP_CODE VARCHAR2 (5), DEPT_CODE VARCHAR2 (10), SALARY NUMBER (8)); data : 00001, ACCOUNT, 15000 00002, FINANCE, 12000 00003, FINANCE, 20000 00004, ACCOUNT, 18000 I have 3 users : admin can select all data and own the table EMP_SALARY and grant the select privilege on table EMP_SALARY to user1 and user2 user1 can select only data with dept_code = 'ACCOUNT' and own the synonym EMP_SALARY reference to ADMIN.EMP_SALARY user2 can select only data with dept_code = 'FINANCE' and own the synonym EMP_SALARY reference to ADMIN.EMP_SALARY The condition that I need is : If I login as user1, using the select statement : select * from emp_salary; the displayed data should be : 00001, ACCOUNT, 15000 00004, ACCOUNT, 18000 And if I login as user2, using the select statement : select * from emp_salary; the displayed data should be : 00002, FINANCE, 12000 00003, FINANCE, 20000
Thank you very much for your help, Suwat KanjanavathangReceived on Sun Jun 14 1998 - 07:45:27 CDT