To design a Query using the Query Editor in SQL Management Studio, select “New Query”. This can be selected either right clicking on the database that you want to make a query for, or by pressing the “New Query” button in the toolbar of Management Studio. This will open a tab on the left portion of the screen. This will look like a standard text area. If you use the “New Query” button in the toolbar, you should make sure the desired database is selected by reviewing the drop down at the top of the application. You will be able to change this drop down, without losing your changes to the query.

To open the Query Editor, you can right click in the query window and select “Design Query in Editor”. You will have the same option by selecting the “Query” Menu at the top of Management Studio.

Within the Query Editor, you will have the option of selecting the database tables that you would like to query.

The following screen will appear. As you can see in the example below, both the Author and Book tables have been selected and now appear in the top half of the query design window.

In the Client table field list in the top half of the query design window, click the check box next to the name of the field that you want to select. I am going to select ClientId, Active and Name.
In the Project table field list in the top half of the query design window, double-click the *. Clicking on the * is the equivalent of selecting all the fields from a particular table. The query design window should appear as in the following example.

Once you have selected all of the fields that you want, you may want to narrow the search with criteria. For example, you may only want the clients that are Active. To do this, you would go to the row of the field that you want to select and create a filter on that field. Please review the sample below.

This will narrow our query to list only clients that are active. Please notice the bottom of the Query Designer Dialog. The Query Designer created the SQL script for us. Once you click the “OK” button, this script will be pasted into the Query window. To run the script you press “Execute” at the top of Management Studio or press F5.