test

mail@pastecode.io avatar
unknown
sqlserver
3 years ago
292 B
1
Indexable
Never
create procedure sp_test
	@num1 int,
	@num2 int,
	@result real output
as begin
	if (@num1 = null and @num2 = null)
		print('İslem Yapilamaz')
	else
		set @result = @num1 + @num2
end

go

declare @res int

exec sp_test 
			10, 
			20,
			@result = @res OUTPUT

select @res