Home

Unused local variables should be removed

Rule description

  • Unused local variables should be removed

 

Non-compliant Code Example

CREATE TRIGGER [DATA].COUNTER_Update
ON [DATA].COUNTER
AFTER UPDATE 
AS

BEGIN
	DECLARE @n int  --Non compliant code (Unused local variable)
    PRINT ' Update the counter'
END
Visual Expert 2020
 VETSQLRULE53