Is there a way to use a function on a Microsoft SQL Server Query without using "dbo." before the function? -
is there way call user defined function without using "dbo." before function name , parameters?
using:
select userfunction(param1, param2, param3, paramn)
instead of:
select dbo.userfunction(param1, param2, param3, paramn)
this isn't possible select
syntax. bol states: "scalar-valued functions must invoked using @ least two-part name of function"
this syntax works however.
create function userfunction (@p int) returns int begin return (2) end go declare @rc int exec @rc = userfunction 1 select @rc
it best practice schema qualify objects referencing anyway though avoid overhead resolving schema (and think plan cache reasons also)
Comments
Post a Comment