5

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.

1

2 Answers 2

4

No, there's no named arguments when calling functions I'm afraid. As you said before, there is in stored procedures.

Sign up to request clarification or add additional context in comments.

Comments

3

Seems to be possible only with EXEC statement:

EXEC @ret = dbo.function1 @par1 = 1, @par2 = 2

See MSDN

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.