How to: Expand Wildcard Characters in SELECT Statements

You can make your application more resistant to breaking changes by expanding any wildcard characters in SELECT statements. Instead of finding and fixing each instance manually, you can update them automatically by using database refactoring. For more information, see Expand Wildcard Characters in SELECT Statements.

To expand the wildcard characters in all SELECT statements that are contained in one object

  1. In Schema View, right-click the object that you want to move, point to Refactor, and click Expand Wildcards.

    The Preview Changes dialog box appears and shows All SELECT statements that will be expanded.

    Note

    In Visual Studio Premium, you refactor database objects by using the Schema View window or from Solution Explorer. You cannot refactor database objects from the Transact-SQL editor.

  2. (Optional) Review the changes, and decide which changes you want to apply to the database project. For more information, see How to: Preview Refactoring Changes.

To expand the wildcard characters in all SELECT statements that are contained in the database project

  1. In Solution Explorer, right-click the database project, point to Refactor, and click Expand Wildcards.

    The Preview Changes dialog box appears and shows All SELECT statements that will be expanded.

  2. (Optional) Review the changes, and decide which changes you want to apply to the database project. For more information, see How to: Preview Refactoring Changes.

See Also

Tasks

How to: Deploy Database Refactoring Changes

Concepts

Move a Database Object to a Different Schema

Fully Qualify the Names of Database Objects

Expand Wildcard Characters in SELECT Statements

Rename References to a Server or Database

Rename All References to a Database Object