solving sql server problems for millions of dbas and developers since 2006
join MSSQLTips for free SQL Server tips














































Build code using the SQL Server object browsers drag and drop

MSSQLTips author Greg Robidoux By:   |   Read Comments   |   Related Tips: More > SQL Server Management Studio

Problem
Trying to remember all of the object names, parameters and columns within tables becomes quite daunting for very large data models.  This is where GUI tools such as Enterprise Manager and SQL Server Management Studio provided a big boost to the database market for SQL Server.  The ability to do most of your work through a graphical interface versus having to do everything command line makes users much more productive and some time consuming tasks can be done with a point and click.  There are several areas where these graphical tools have made a big impact on who is and who can use SQL Server.  One feature that is often difficult is writing T-SQL statements for your databases.  Trying to remember the exact names of the tables, the columns, the stored procedure parameters is not always that easy.  So what can be done to ease this process?

Solution
Luckily some of these features are built-in to the tools that Microsoft offers.  In Query Analyzer for SQL Server 2000 there is the Object Browser and in SQL Server 2005 Management Studio there is the Object Explorer.   These tools allow you to see all of the contents of your databases including tables, views, stored procedure parameters, etc... 

To view the Object Browser or Object Explorer you can use the "F8" key.

SQL Server 2000

SQL Server 2005

The nice thing about the object browser and explorer is that you can view the contents of your database.  The tables, views, columns, etc... 

An even better feature of these tools is the ability to drag and drop the values that are shown into your query windows so you do not need to retype the table names, columns names, etc....

To do this, just select the value that is shown in the object explorer or object browser and then drag it into the query window.  This can be done for any item that is listed in the object explorer or object browser.

Take a look at this quick video that shows you how this is done: PLAY VIDEO

Next Steps



Last Update: 5/16/2007


About the author
MSSQLTips author Greg Robidoux
Greg Robidoux is the President of Edgewood Solutions and a co-founder of MSSQLTips.com.

View all my tips
Related Resources


print tip Print  
Become a paid author




Recommended For You








Comments and Feedback:

Post a Comment or Question

Keep it clean and stay on the subject or we may delete your comment.
Your email address is not published. Required fields are marked with an asterisk (*)

*Name   *Email Notify for updates

Signup for our newsletter


Comments
*Enter Code refresh code


 
Sponsor Information







Copyright (c) 2006-2014 Edgewood Solutions, LLC All rights reserved
privacy | disclaimer | copyright | advertise | about
authors | contribute | feedback | giveaways | user groups | community | events | first timer?
Some names and products listed are the registered trademarks of their respective owners.