How to specify Values for SSMS Template Parameters

To open a template script, double click on it or drag it from the Template Explorer (Template Browser) to SQL Server Management Studio (SSMS) Query Editor Window:

template_open_in_query_editor

The template is a T-SQL script with parameters that are in angle brackets in the following format: parameter_name, data_type, default_value:

template_parameters_in_query_editor

To edit template parameters use keyboard shortcut keys Ctrl+Shift+M, or select 'Specify Values for Template Parameters' from the SSMS Query menu:

template_parameters_specify_values_menu

It will open the 'Specify Values for Template Parameters' window:

template_parameters_specify_values_window_old

If you need to change the default values, enter new values into the Value field, and press OK:

template_parameters_specify_values_window_changed

Parameter blocks will be replaced by the values you entered, and the script will be ready for execution:

template_parameters_replaced_with_values