Oracle Virtual Private Database [message #638055] |
Mon, 01 June 2015 17:00 |
|
glmjoy
Messages: 187 Registered: September 2011 Location: KR
|
Senior Member |
|
|
Create Table Designation (Designation_Code char(5),Designation_Name Varchar2(50));
insert into Designation ('00001','MANAGER');
insert into Designation ('00002','DEPUTY MANAGER');
insert into Designation ('00003','ASSISTANT MANAGER');
insert into Designation ('00004','HR MANAGER');
insert into Designation ('00005','OFFICER');
insert into Designation ('00006','SUPERVISOR');
insert into Designation ('00007','WORKER');
Create Table emp(empno char(5),Employee_Name varchar2(70),Designation_Code char(5));
insert into emp ('00001','HARRIS','00001');
insert into emp ('00002','PAUL','00002');
insert into emp ('00003','NOEL','00002');
insert into emp ('00004','JAMES','00003');
insert into emp ('00005','DONALD','00004');
insert into emp ('00006','STEVE','00005');
insert into emp ('00007','MARTIN','00006');
insert into emp ('00008','SIMON','00005');
insert into emp ('00009','ANDREW','00006');
insert into emp ('00010','MAC','00007');
insert into emp ('00011','SUSZAN','00005');
-------------------------
I have 2 users who will access these record USER EMP1 and EMP2
my query is when USER EMP1 get login he will get only managerial Data
-----------
00001 HARRIS 00001
00002 PAUL 00002
00003 NOEL 00002
00004 JAMES 00003
00005 DONALD 00004
When USER EMP2 get login he will get only non managerial Data
00006 STEVE 00005
00007 MARTIN 00006
00008 SIMON 00005
00009 ANDREW 00006
00010 MAC 00007
00011 SUSZAN 00005
I want that security using Oracle Virtual Private Database or if any other solution kindly shared with me.
Thanks in Advance
|
|
|
|
|
|
|
|