SQLcommitted

Committed with SQL

SQL Server– Template Explorer

Yesterday when I was about to leave office , I got a call on my mobile from one of my friend. He wanted to know how to write a recursive query?

I said use Template Explorer, Where you can get examples for recursive query but He was unaware of this feature of SQL server. So I thought to write on this.

SQL server provides number of templates which can be used to Create, Alter and Drop different database objects  like Table, Index, Triggers, View and many more. With the help of Template Explorer you can do DDL operation on object as well as you can learn How to write recursive query too.

Follow below steps to open the recursive query example:

Step 1- Open SQL Server Management Studio

Step 2 – Use shortcut key Ctrl + Alt + T or You can find this option under View-> Template Explorer

image

Step 3: Expand Recursive Queries section

image

 

We can create our own Custom Template. Refer How to create custom template?. When first time the template explorer is opened, a copy of the templates are placed in the user’s folder in C:\Users, under <username>\AppData\Roaming\Microsoft\SQL Server Management Studio\11.0\Templates. So that all users can have their own copy of templates.

 

If you liked this post, do like on Facebook at https://www.facebook.com/s4sql

About these ads

August 21, 2012 - Posted by | SQL Info, SSMS Environment Settings | , , , , , ,

2 Comments »

  1. Good one.. Even I didn’t no Template explore.. Now on wards I ll create templates and re-use it :)

    Comment by Raghavendra | September 9, 2012 | Reply

  2. grt article

    Comment by mithun | September 6, 2012 | Reply


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

Follow

Get every new post delivered to your Inbox.

Join 76 other followers

%d bloggers like this: