I would like to know if in SQL is it possible to return a varchar
value from a stored procedure, most of the examples I have seen the return value is an int.
Example within a procedure:
declare @ErrorMessage varchar(255)
if @TestFlag = 0
set @ErrorMessage = 'Test'
return @ErrorMessage
You can use out parameter or the resulset to return any data type.
Return values should always be integer
Taken from here