有什么方法可以使用 SQL 服务器的代码片段功能来调用带有空值参数的存储过程?

Is there any way to use code snippets feature of SQL Server to call stored procedure with it`s parameters with null value?

我有一个带有多个参数的存储过程,我每次都调用它,如下代码所示:

EXEC sp_General_AutoIncrement 
    @tbl_Name = 'tbl_General_MenuParents',
    @fld_Name = 'MenuParent_Code',
    @startWith = 1,
    @new_ID = @MenuParent_Code OUTPUT;

我的问题是:

有没有什么方法可以使用代码片段功能来创建具有 null 或空参数的调用存储过程或函数,并像这样快速创建代码:

EXEC sp_General_AutoIncrement 
    @tbl_Name = '',
    @fld_Name = '',
    @startWith = 0,
    @new_ID = @MenuParent_Code OUTPUT;

你有什么想法?

感谢您的关注。

在默认情况下,您可以:

Right Click > Script > Execute To

但是,有很多商业产品可供选择:

Apex, SSM-Booster and RedGate SQL Prompt. 

您可以定义自定义代码段。