문제

Is it possible to create a function that might be called with a different number of parameters (minimum two).

So, two parameters are always present and the others are optional.

도움이 되었습니까?

해결책

Try default parameter, like this:

create function your_func (@p1 int, @p2 int, @p3 int = 123, @p4 int = 456) 

I am not sure about Sybase ASE, but this would work on MS SQL Server's T-SQL.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top