create proc CRUD
	@op char(1),
	@Id int
as
	begin
		if @op = 'R'
			begin
				select * from Proizvod
			end
		else if @op = 'D'
			begin
				if exists (select 1 from Proizvod where IDProizvod=@Id)
					begin
						delete Proizvod
						where Proizvod.IDProizvod = @Id
					end
				else
					begin
						print 'Proizvod ne postoji'
					end
			end
	end

select * from Proizvod

exec CRUD R,null
exec CRUD D,1
exec CRUD D,1