Share via


How to: Save a Query or Script

After you change a Transact-SQL query or script in the Transact-SQL editor, you must save your changes. Saving changes to a query or script is no different from saving changes to any other text, code, or XML file.

To save changes to a query or script

  1. On the File menu, click Save FileName.

    Note

    You can also use Save FileName As to save the script or query with a new name or in a new location.

  2. If you edited a file that was under version control without checking it out and if you changed the Visual Studio default so that it prompts you to check out files, you are prompted to check the file out. Click Yes to check out the file and save your changes.

    If you edited a file that is saved to disk, the asterisk on the document window disappears after you click Save FileName. No asterisk means that the file has not been modified since the last time that you saved it.

See Also

Tasks

Walkthrough: Create and Execute a Simple Transact-SQL Script

Concepts

Editing Database Scripts and Objects with the Transact-SQL Editor