In the Management Studio, you should be viewing

In the Management Studio, you should be viewing the Object Explorer window on the left side. If it is not displayed, you can open it by choosing View.Object Explorer. Object Explorer uses a tree structure to group information into folders. Expand the folder named Databases to show all the databases available to you. For this example, click the AdventureWorks database. 4. Open the Query Editor and begin constructing your SQL query. Right-click the database named AdventureWorks and you will see a popup menu of options. Select the New Query menu item and you will see the Query window open to the right of your Object Explorer. Note also that a new toolbar displays after this action. The second toolbar is the SQL Editor toolbar to help in executing SQL queries. An alternative way of opening the Query Editor is to click the New Query button on the standard toolbar to do this. However, if you use this method, you will be prompted to connect to the server with another Connect to Server dialog box like the one shown in Figure 2-2. In this case, you need to select Database Engine as the server type and make sure it is connecting to the same server with the same authentication as you entered in Step 2 above. Then click the Connect button to open the Query Editor window. You see a dialog box similar to the one in Figure 2-3. You can now enter SQL statements to execute on the server that s running SQL Server 2005. Figure 2-3: Query Analyzer with a connection to the Adventure Works database. Chapter 2: Retrieving Data from a Database 35

Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost Clan Web Hosting services

Bookmark the permalink.

Comments are closed.