proceduretest

mail@pastecode.io avatar
unknown
sql
2 years ago
290 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