Expanding wildcards
Published 11 February 2013
SQL Prompt enables you to expand SELECT * and SELECT table.* statements so that they list all of the columns that exist in the referenced tables.
Expanding all wildcards in a SQL script is available only in SQL Prompt Pro Edition.
You can only expand individual wildcards in a script using SQL Prompt Standard Edition; for details see Expanding SELECT * to insert all columns.
To expand all wildcards in a SQL script:
- Open the script you want to modify in a SQL Server Management Studio query window.
- Ensure you are connected to the SQL Server and database that contains the objects referenced in the SELECT statements.
- If required, select the portion of SQL that contains the SELECT statements that you want to expand. If you do not select any SQL, all SELECT statements in the script are expanded.
- On the SQL Prompt menu, click Expand Wildcards.
You can undo the changes to the script using the standard SQL Server Management Studio Undo features.
To keep the changes, save the script.
Keyboard shortcut: hold Ctrl and press B then W to expand all wildcards in a script, or highlight a particular wildcard to expand only that one. (SQL Prompt 5.3 only)