How to set default value for a variable in a parameter list
I want the variable to take a default value when a value not passed to开发者_如何学Python a Table valued function.
Could any one please help me do this.
A table valued function with default value for a parameter.
create function GetValue(@Value int = 1)
returns table as return
(
select @Value as ID
)
Use it like this
select *
from dbo.GetValue(default)
精彩评论