I think the answer depends on which features of stored procedures you need to use.
Stored procedures returning a result set can be run using Query
; stored procedures which don't return a result set can be run using Execute
- in both cases (using EXEC <procname>
) as the SQL command (plus input parameters as necessary). See the documentation for more details.
As of revision 2d128ccdc9a2 there doesn't appear to be native support for OUTPUT
parameters; you could add this, or alternatively construct a more complex Query
command which declared TSQL variables, executed the SP collecting OUTPUT
parameters into the local variables and finallyreturned them in a result set:
DECLARE @output int
EXEC <some stored proc> @i = @output OUTPUT
SELECT @output AS output1