Home

Multiple variables should not be declared on the same line

Rule description

  • Multiple variables should not be declared on the same line

 

Non-compliant Code Example

DECLARE @Number int, @text As varchar(100),@modification as datetime;  --Non compliant code (Multiple variable declared in the same line)
SET @Number = 50;

Compliant Code Example

DECLARE @Number int,
DECLARE @text As varchar(100),
DECLARE @modification as datetime;  --Compliant code (Each variable declared in the new line)
SET @Number = 50;
Visual Expert 2020
 VETSQLRULE52