Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL 2000 functions and parameters default value
Message
From
07/03/2002 13:32:06
 
 
To
All
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Title:
SQL 2000 functions and parameters default value
Miscellaneous
Thread ID:
00629760
Message ID:
00629760
Views:
34
Ok, here's the part of BOL about CREATE FUNCTION:

   CREATE FUNCTION [ owner_name. ] function_name
   ( [ { @parameter_name [AS] scalar_parameter_data_type [ = default ] } [ ,...n ] ] )


(Bold is my emphasis)

Now, in Invoking User-Defined Functions, we can find this:

   When you invoke a function, you must supply argument values for all of the parameters...

Now the question: what's the point of specifying a default if you've got to supply the argument in the first place? I wanted to have an optional argument to a function I'm creating, so based on the CREATE FUNCTION help, I assumed it was possible, but looks like it isn't.
Sylvain Demers
Next
Reply
Map
View

Click here to load this message in the networking platform