Skip to content
Advertisement

How to get the return value from EXEC(Query) inside stored procedure

Is there any way to get the return value from the following SQL script?

The @ColumnValue will be 1 or 0. I am expecting single value from @ColumnValue. I want to check if the @ColumnValue is NULL or not. If Not Null, I want to update a table with this @ColumnValue.

Thanks in advance

Advertisement

Answer

If you update table inside SP, you can try the following query.It is better not to use sp in procedure name.

Thanks

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement