Reputation: 103
Is there a way to call a SQL Server / T-SQL function using parameter names?
Something like:
select dbo.function1 (@par1 = 1, @par2 = 2)
It is possible to do so with stored procedures.
Upvotes: 5
Views: 5873
Reputation: 51
Seems to be possible only with EXEC statement:
EXEC @ret = dbo.function1 @par1 = 1, @par2 = 2
Upvotes: 3
Reputation: 5615
No, there's no named arguments when calling functions I'm afraid. As you said before, there is in stored procedures.
Upvotes: 4