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

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 🙂

    Raghavendra's avatar Comment by Raghavendra | September 9, 2012 | Reply

  2. grt article

    mithun's avatar Comment by mithun | September 6, 2012 | Reply


Leave a reply to mithun Cancel reply

Design a site like this with WordPress.com
Get started