I would like to know if it's possible to create a Count variable like you would in C#.
DECLARE @Count Int
SET @Count = 0
--something happens
SET @Count += 1
--something happens
SET @Count += 1
IF @Count < 3
BEGIN
--Do something
END
In SQL-Server you can do It in following:
SET @count = @count + 1
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