Call a stored procedure that requires parameters without parameters?

Is there any way to call a stored procedure without parameters, even if it usually has parameters?

Thank: -)

+3
source share
2 answers

If you can, recreate SPROC with the default settings.

CREATE PROC myproc(@param1 AS INT = 0, @param2 AS VARCHAR(20) = '')

etc.

+4
source

You can, if you set the parameters in the stored proc for the default value. Then you do not need to skip them.

EDIT:

CREATE PROCEDURE [ProcName]
(
    @filterId int = NULL
)

The implementation of this eliminates the need for its transfer. Although you can if you want.

+3
source

Source: https://habr.com/ru/post/1756882/


All Articles