Writing a Query

The primary tool that facilitates the development of SQL statements is the Query/View Designer, which is a graphical tool that enables you to build queries with a point-and-click interface. After a query is constructed, this tool also enables you to view and interact with any results returned as a result of executing the query.

Now you’re ready to put this tool through its paces.

Creating a new select query against a table is as simple as selecting the database in Server Explorer and then, under the Data menu, selecting New Query. An initial prompt gathers a list of the tables, views, functions, and/or synonyms to use as the target of the query (see Figure 21.13).

Figure 21.13 Adding tables to the query.

After you have selected ...

Get Microsoft® Visual Studio® 2010 Unleashed 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.