SQL Server Management Studio comes with templates that can be used as a starting point for common operations.

To view templates: View => Template Explorer

You can also create your own templates. I’ve created a folder named ‘Custom’ to store my templates.

To create a template directory: In the Template Explorer, right click on ‘SQL Server Templates’ and select ‘New’ => ‘Folder’

To create a custom template: Right-click on the folder that will hold the template and select ‘New’ => ‘Template’.  Name your template. Right-click and select ‘Edit’. A new query window will open. Add your SQL that will serve as your template, and save.

To use a template, just find the template in the explorer and drag it to the query pane.