Home

Empty statements should be removed

Rule description

  • Empty statements should be removed

 

Non-compliant Code Example

DECLARE @Number int;;  --Non compliant code (Empty statements)
SET @Number = 50;   ; --Non compliant code (Empty statements)
IF @Number > 100 
BEGIN
    Select * From Employee Where id < @Number;
    PRINT 'The number is positive.'; 
END

Compliant Code Example

DECLARE @Number int;  --Compliant code
SET @Number = 50;  --Compliant code
IF @Number > 100 
BEGIN
    Select * From Employee Where id < @Number;
    PRINT 'The number is positive.'; 
END
Visual Expert 2020
 VETSQLRULE55