The following examples show how SQL Prompt can help you to write queries more quickly. All these examples use the AdventureWorks database for SQL Server 2005.
se (press Tab)
As you type, the suggestions box is displayed. Whenever you press the Tab key, SQL Prompt inserts the currently highlighted suggestion into the query:
Press Tab, then the Spacebar, then type:
The suggestions box shows all relevant suggestions beginning with p :
SQL Prompt always places the most contextually relevant types of suggestions at the top of the list, depending on what you have typed in your query.
In SQL Server 2005 and 2008, SQL Prompt automatically inserts the schema name for objects in non-default schemas.
In this example, the Spacebar is used as an additional insertion key. To define the Spacebar as an insertion key:
From now on, each time you press the Spacebar, the currently highlighted suggestion will be inserted into your query.
Create a new query and type:
* fr (include all the spaces)
SQL Prompt will insert the matching suggestion whenever you press the Spacebar, so your query should now look like this:
You can move the cursor to just after the * and press Tab to insert all columns:
For more information on snippets, see Managing snippets.
custo filter the list to the two customer tables, then press Enter to insert the first (highlighted) table:
Cross-database queries are automatically supported in SQL Prompt. You do not need to select an option to enable them.
SELECT * FROM pub
If you do not have permissions to connect to that database, or to access some objects in the database, a warning dialog is displayed: