add files from day 2
This commit is contained in:
parent
4bf17cd0f7
commit
c3436a46d7
|
@ -0,0 +1,24 @@
|
|||
-- Queuries to create test table and change the permissions of the underpriviledged user
|
||||
|
||||
use IBZ;
|
||||
|
||||
create table SprechendeTiere
|
||||
(
|
||||
ID int identity(1,1) not null,
|
||||
Tierame varchar(50)
|
||||
constraint pk_sprechende_tiere primary key (ID)
|
||||
);
|
||||
|
||||
|
||||
insert into SprechendeTiere(Tierame)
|
||||
values ('Einhorn');
|
||||
|
||||
-- Grant
|
||||
|
||||
grant select on SprechendeTiere to ibzadmin;
|
||||
|
||||
grant delete on SprechendeTiere to ibzadmin;
|
||||
|
||||
grant update on SprechendeTiere to ibzadmin;
|
||||
|
||||
grant all on SprechendeTiere to ibzadmin;
|
|
@ -0,0 +1,16 @@
|
|||
-- Test Queries for an unprivileged user
|
||||
|
||||
use IBZ;
|
||||
|
||||
select * from SprechendeTiere;
|
||||
|
||||
delete SprechendeTiere
|
||||
where Tierame='Einhorn';
|
||||
|
||||
update SprechendeTiere
|
||||
set Tierame='Einhörner'
|
||||
where Tierame='Einhorn';
|
||||
|
||||
|
||||
insert into SprechendeTiere(Tierame)
|
||||
values ('Papagei');
|
Reference in New Issue