Mark declare statements SQL Server reports they are run.
How to test this code:
create or alter procedure test_cover as
begin
declare @var int
= 0
declare @var1 int
= (select 1 + 2)
declare @var2 int
declare @var3 int,
@var4 int = 42,
@var5 int
end
go
Has been tested on (remove any that don't apply):
SQL Server 2022 for Linux (Microsoft official Docker image)
Mark declare statements SQL Server reports they are run.
How to test this code:
Has been tested on (remove any that don't apply):