SQL Prompt is a code completion, code formatting, and refactoring tool for SQL Server. It’ll plug into SQL Server Management Studio or Visual Studio. You’ll find you can work more quickly and accurately with SQL queries, as well as standardize across your team by sharing formatting styles and commonly used SQL snippets. Try it free for 28 days at www.red-gate.com/sqlprompt
SQL Prompt is a code completion, code formatting, and refactoring tool for SQL Server. It’ll plug into SQL Server Management Studio or Visual Studio.
You can rely on SQL Prompt for speed and accuracy, and save yourself time writing and exploring SQL, so you can focus on the important stuff. We’ve found it can speed up SQL coding by 52%.
SQL Prompt has a host of features you’ll find useful everyday – from customizable snippets for the code you use most, which you can share with your team, to tab coloring, so you don’t execute code in the wrong environment.
You can work super-fast with data from the Results grid – exporting them straight to Excel, or even scripting them out as an INSERT statement.
Let’s jump into SQL Prompt and see these features in action.
By simply typing J, SQL Prompt autocompletes JOIN, gives you table suggestions, and JOIN conditions, so you don’t have to memorize column names or aliases.
We’ve got a SELECT * here: SQL Prompt expands the wildcard so you can keep just the columns you need. Or, use the Column Picker, and hit Tab. These tooltips give you hints about keyboard shortcuts too.
We’re using an alias here. SQL Prompt lets you easily rename an alias or variable – it’ll rename every alias in the script, which is great if you’re doing a bit of refactoring. Just right click, or hit F2. Hit Shift+F5 and SQL Prompt will execute just the statement under your cursor.
And that tip about working with data in the Results grid? Just right click here, and choose to Export to Excel, copy as an IN clause, or script as an INSERT statement.
Here’s how to format your code to your preferred style. Say you’ve got an organizational standard, but you want to code in your own style first. Go to Options, and under Format you’ll find a variety of settings including casing and commas. See the changes in the sample window, and save or export your settings to share with your colleagues. In the query window, just hit CTRL+K+Y to format your code.
We’ve got new formatting options coming soon, too, so keep an eye out!
Another handy feature in SQL Prompt is snippets, which save you time with repeat blocks of code. Type SSF then hit Tab and you’ll see SQL Prompt inserts SELECT * FROM. This is just one of many built-in snippets. You can easily customize these or create your own. Open the Snippet Manager and click New. Give your snippet a name, insert your code, and save. Now it’s ready for you to use.
Or, you can access snippets from the Actions List, as well as comment out code, or surround it with a function like BEGIN/END.
If you’re refactoring code, SmartRename will help you out – it’ll catch every reference for you, so nothing breaks. This is built on Redgate SQL Compare, the industry’s most trusted comparison tool, so you’re in safe hands. From here, you can view actions, warnings, and dependencies.
Other time savers:
Here’s a little life saver for you – say you write a DELETE statement without a WHERE clause, SQL Prompt will ask you if you really want to execute it.
Not only that, but you can specify colours for each environment, so it’s easy to see if you’re connected to development or production.
Notice the green tab? That’s the color we’ve picked for development. This bright red one tells us we’re in production. You can set the colours at the database or server level.
While we’re looking at tabs, check out Tab History. If SQL Server Management Studio crashes, SQL Prompt will reopen all your tabs the next time you launch SSMS. Or say you get distracted and close a tab without thinking, you can explore and reopen closed tabs.
Alongside all this, we’re regularly adding new features and improvements based on the top suggestions from our users.
To see how SQL Prompt can make you more productive and save you from some nasty errors, try it free at www.red-gate.com/sqlprompt