Monday 16 January 2012

Scalar value function

If a function return a value then that function is called scalar value function
create function fxemp(@cdate datetime)returns varchar(50)
as
begin
return replace(convert(varchar(50),@cdate,106),' ','-')
end

Execute the function
select dbo.fxemp(getdate())

No comments:

Post a Comment