The fastest way to count null values
select sum(case when a is null then 1 else 0 end) count_nulls , count(a) count_not_nulls from <YourTable>;
The fastest way to count null values
select sum(case when a is null then 1 else 0 end) count_nulls , count(a) count_not_nulls from <YourTable>;
declare @DefaultDataPath sql_variant declare @DefaultLogPath sql_variant set @DefaultDataPath = SERVERPROPERTY('InstanceDefaultDataPath') set @DefaultLogPath = SERVERPROPERTY('InstanceDefaultLogPath') select @DefaultDataPath, @DefaultLogPath