This question must be really silly, but I haven't found an answer for it yet.
I'm making a program in C # that dynamically writes a script to run on SQL Server. I declared two variables that receive the values returned from two calls exec 'procedure_name'.
In the next block of the script, I want these variables to be set to zero.
How to do this using a SET?
would be something like this: SET @ a, @ b = 0?
You can do it via SELECT:
SELECT @a = 0, @b = 0
With SET you need 2 SET commands:
SET @a = 0; SET @b = 0
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With