Share via


How to: Save Queries

Save your query when you want to work with it later. Note that running your query does not save your changes.

Note

To save your query in a project, that database project must be open.

Note

Queries can only be saved to a database project. If you don't have a database project open, the Save command will not be available.

Note

The dialog boxes and menu commands you see might differ from those described in Help depending on your active settings or edition. To change your settings, choose Import and Export Settings on the Tools menu. For more information, see Visual Studio Settings.

To save a query

  1. Create your query.

  2. From the File menu, click Save <query_name>.

    Note

    A newly created query will be given a system name. To choose your own name for the query choose Save <query_name> As.

  3. The query will be saved in the Query folder of the project in Solution Explorer.

See Also

Tasks

How to: Create Queries

How to: Run Queries

How to: Discard Changes Made to Queries

Other Resources

Designing Queries and Views

Working with Views

Types of Queries

Performing Basic Operations with Queries