I have a function with optional param like this :
ALTER FUNCTION [dbo].[FN_Foo] ( @P1 AS INT ,@p2 AS INT = 29 )
how to call it without passing the optional param?
select * from [dbo].[FN_Foo] (1)
I have a function with optional param like this :
ALTER FUNCTION [dbo].[FN_Foo] ( @P1 AS INT ,@p2 AS INT = 29 )
how to call it without passing the optional param?
select * from [dbo].[FN_Foo] (1)
You can call the DEFAULT which is defined in your function
select *
from [dbo].[FN_Foo] (1, DEFAULT)