Hello, can I somehow call a stored proc without params, even though it normally has params?
Thanks :-)
Hello, can I somehow call a stored proc without params, even though it normally has params?
Thanks :-)
You can if you set the params in the stored proc to have a default value. Then you don't have to pass them.
EDIT:
CREATE PROCEDURE [ProcName]
(
@filterId int = NULL
)
Doing this will eliminate the need to have to pass it. Though you can if you want to.
If you can, recreate the SPROC with default parameters
CREATE PROC myproc(@param1 AS INT = 0, @param2 AS VARCHAR(20) = '')
etc