I.5.5. Running Queries

If your job is to design, develop, or administer a SQL Server database, you'll be very interested in this section. We show you how to take advantage of the SQL Server Management Studio's rich query capabilities. To begin, we take you on a brief tour of query-specific user interface features. After that, we illustrate some sample queries.

NOTE

Although this section is titled "Running Queries," you can perform any database interaction (such as updates, deletions, creating tables, and so on) using these capabilities.

I.5.5.1. Query-specific user interface features

As shown in Figure 5-5, many icons for designing queries are at your disposal.

Figure I.5-5. SQL Server Management Studio icons.

Here's a quick list of these icons, along with a simple summary of each one:

  • Connect: Request a connection to a specific SQL Server instance.

  • Disconnect: End your connection with this SQL Server instance.

  • Change Connection: Switch connections to another SQL Server instance.

  • Available Databases: Presents a list of accessible candidate databases.

  • Execute: Run your SQL statement.

  • Parse: Have SQL Server check your syntax and identify any errors.

  • Cancel Executing Query: Stop a long-running query in its tracks.

  • Display Estimated Execution Plan: Instruct SQL Server to tell you how it plans to process your statements.

  • Trace Query in SQL Server Profiler: Show the progress of your SQL ...

Get Microsoft® SQL Server™ 2008 All-In-One Desk Reference For Dummies® now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.