How to execute a query in SQL server

When developers working with SQL Server “Denali”, MS SQL Server 2008 R2 and MS SQL Server 2005 want to execute a query, they should follow the next steps:

1. Open or create the query they want to run.

2. Right-click anywhere in the query window, and select Execute SQL from the shortcut menu.

–or–

Press CTRL+R.

The results of the Select query appear in the Results pane. The Query and View Designer returns results to developer’s computer in batches (incrementally) so that developer can begin viewing results as soon as possible, and so that he/she can perform other tasks while the query is underway.If developers are planning to run Update, Insert From, Insert Into, Delete, or Make Table query, the Query and View Designer displays a message indicating how many rows were affected by the query.