SQL Server Templates

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.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: