Without explicitly passing something in the arg list of a procedure how can you access a RETURN value, for example
I say this as I have a situation where I am using a lot of stored procedures that return values like this and I do not want to have to edit them to add another value to each arg list.
Code:
create sp1
as
begin
if exists (select foo from foobar)
begin
return 1
end
else
begin
return 0
end
end
go
create procedure sp2
as
begin
declare @foo int
set @foo = exec sp1
end
go
I say this as I have a situation where I am using a lot of stored procedures that return values like this and I do not want to have to edit them to add another value to each arg list.