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)
shadcome
  • 49
  • 7

1 Answers1

0

You can call the DEFAULT which is defined in your function

select *
from [dbo].[FN_Foo] (1, DEFAULT)
kcotman
  • 76
  • 4