I forgot to tell you to create a value to output the value to
declare @got_val varchar(10)
set @got_val = ''
execute stor_proc @got_val
print @got_val
In the procedure you need to accepr the pass
create stor_proc
@returnval varchar(10) output
as
......
return @returnval
Software engineers are trained to read and understand code; they are not trained in mind reading. Document the purpose not just the functionality.