Scaler functions
• May or may not have parameters, but always return a single value.
----------------------------------------------------------------------------
select square(3)
select getdate()
declare @dob date
declare @age int
set @dob='03/25/1890'
set @age=DATEDIFF(year,@dob,getdate())
select @age
-------------------------------------------------------------------------------
create function calculateage(@dob date)
returns int
as
begin
declare @age int
set @age=DATEDIFF(year,@dob,getdate())
return @age
end
select dbo.calculateage('03/25/1990')
On this page of the site you can watch the video online SQL Server Scaler Function. Session 29 with a duration of hours minute second in good quality, which was uploaded by the user Sunny@Pandita 13 September 2024, share the link with friends and acquaintances, this video has already been watched 59 times on youtube and it was liked by 5 viewers. Enjoy your viewing!