Passing paremeters into Functions when using EXEC command
I am trying to learn SQL on SQL Server and several functions/SPs require parameters. For example, when I enter "exec sys.fn", the intellisense brings up vario开发者_如何学Cus functions/SPs and some have brackets which describe parameters.
How do I pass the parameter in? Although I saw some examples, they were for custom SPs so I couldn't quite apply them.
Thanks
Try
EXECUTE yoursp @parametername1 = value1, @parametername2 = value2
and so on. If you supply all necessary parameters for the SP, you can also just state them in order, for example:
EXECUTE yoursp value1, value2
精彩评论