Viewing 2 posts - 1 through 2 (of 2 total)
A major use case missed is use of the OVER clause:
select
id,
name,
designation,
Salary,
AVG(salary) over (partition by designation) Avg_Sal
from [dbo].[Associates]
would yield the entire list, along with the average salary for all with the...
July 1, 2022 at 11:52 am
#4057503
What is more interesting is that
IF (1 <> 1)
BEGIN
DECLARE @NumOfHolidays INT;
SET @NumOfHolidays = 0;
END
SELECT @NumOfHolidays;
returns null, not an error
August 13, 2021 at 12:11 pm
#3919590