Click here to Skip to main content
13,459,013 members
Click here to Skip to main content
Add your own
alternative version


3 bookmarked
Posted 17 Nov 2010

SQL Server Template Explorer

, 25 Nov 2010
Rate this:
Please Sign up or sign in to vote.
How do you use the Template explorer and assign parameter values.
Do you feel tired of knowing or searching for the syntax of doing some tasks like creating database, adding a constraint to a table etc.,?

SQL 2005 provides lots of template of doing basic tasks. This tip is for people who do not know about template explorer.

Let me provide this TIP with a small example of creating a database (Database only) called Inventory.

01) Launch the SQL Server 2005 Management studio
02) Click on Menu Item View=>Template Explorer (Or Ctrl+Alt+T)
03) This will open the Template Explorer on the left or right side pane
04) Have a look at the almost for all the tasks there is a template.
05) For our example, expand the Database folder
06) Double click the create database node
07) Provide the authentication in the displayed dialog to connect to the db
08) You have a template code in the Query Editor Window.
09) Now you need to fill the parameters for the Template before running the Query
10) Look for the Toolbar Icon A=>B, the Tool tip says, "Specify values for template Parameters". And click on it.
11) The displayed dialog shows all the Template parameter required. Fill in the Value for the database name. Click OK.
12) Have look at the Query in the query editor window. It is now ready to create the database. Execute the Query to finish the task of creating the database.

I have taken a very simple template for this tip. But can try with some other templates. I think this TIP will minimize going web search for the syntax of performing the basic tasks. Please try with Someother Template Options.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Sivaraman Dhamodharan
Software Developer iSOFT
India India
I am working as software engineer in iSOFT R&D. I have been come across C++,MFC, .net technologies. I do like playing video games, reading books.


You may also be interested in...


Comments and Discussions

GeneralReason for my vote of 5 A handy little tip Pin
CIDev22-Nov-10 14:21
memberCIDev22-Nov-10 14:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.180323.1 | Last Updated 26 Nov 2010
Article Copyright 2010 by Sivaraman Dhamodharan
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid