add files from day 2

This commit is contained in:
Andreas Zweili 2017-06-03 11:18:58 +02:00
parent 4bf17cd0f7
commit c3436a46d7
2 changed files with 40 additions and 0 deletions

View File

@ -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;

View File

@ -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');