Wildcard expansion in SQL statements

The topic describes how to expand SQL statements.

Query Formatting Overview

Wildcard expansion

The feature allows you to replace the asterisk (*) symbol with the list of columns from the required table or view with help of the Tab key.

Inserting columns list on pressing Tab

You can insert a list of columns available for required objects (tables, views, etc.) of the FROM list instead of the * symbol by pressing the Tab key. If such list can be inserted, a hint is displayed when the pointer is placed after the * symbol.

Expand * in SELECT on Tab

Expanding stored procedures

This feature allows to simplify debugging by replacing a call to a stored procedure with the stored procedure body - it takes the content of a stored procedure and substitutes the call in your query for it. To apply this feature to the required code, click the Convert EXEC to Script option on the shortcut menu.

Convert Exec to Script

Expanding INSERT, ALTER, EXEC, UPDATE statements

This feature allows typing available table names, views, procedures, functions or triggers in ALTER, INSERT, EXEC, and UPDATE statements and then expand the statement to the full template by pressing the Tab key.

In UPDATE statements, a full list of columns from a specified table is inserted into the code you are typing.

Apart from the template, the type of column data will be generated in the comments along with the NOT NULL and ROWGUID properties. For datetime, a template for inserting time will be created. Also a DEFAULT clause is generated if a default value is created for a table.

Note
dbForge Studio will not offer to expand the ALTER statement for encrypted triggers, views, procedures and functions.

expandinsert-statement

Execute current statement

You can execute the current SQL statement without selecting it. You just need to place the pointer over the statement and press Ctrl+Shift+E or Alt+Enter - and dbForge Studio will define statement boundaries itself.

execute-current-statement

Download dbForge Studio for SQL Server and try it absolutely free for 30 days!

Want to Find out More?

Overview

Overview

Take a quick tour to learn all about the key benefits delivered by dbForge Studio for SQL Server.
All Features

All features

Get acquainted with the rich features and capabilities of the Studio in less than 5 minutes.
Request a demo

Request a demo

If you consider employing the Studio for your business, request a demo to see it in action.
Ready to start using dbForge Studio for SQL Server?