Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- create user dba1;
- create user medico1;
- create user estagiaria2;
- create user secretaria2;
- -- 1)
- grant select (nome) on medico to estagiario1;
- grant select (nome) on paciente to estagiario1;
- grant select (data) on consulta to estagiario1;
- -- 2)
- grant insert on funcionario to estagiario1;
- -- 3)
- grant select, update, insert on paciente to medico1;
- -- 4)
- grant select(salario), update (salario) on funcionario to dba1;
- -- 5)
- create view viewMedico2 as select medico.* from medico, ambulatorio where medico.numeroa = ambulatorio.numeroa and ambulatorio.andar = 4;;
- select * from viewMedico2;
- grant select on viewMedico2 to secretaria1;
- -- 6)
- create role consultas1;
- grant select on paciente, medico to consultas1;
- create user u11;
- create user u22;
- grant consultas1 to u11, u22;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement