Entering and Executing Queries

A batch file (or script) is a collection of Transact-SQL statements used to perform a task. Scripts, stored as files, form a foundation for many server application projects. Definitions of tables, indexes, and stored procedures, as well as reports and batch jobs, are usually stored in script files.

Once you make a connection to a server, click the Database drop-down list and click the name of the database with which you want to work. You can enter queries in a number of ways. To execute a query, click the Go button on the toolbar, or select Execute Query from the Query menu.

The ResultSets display in the Output Window.