It's intellisense for SQL Server
- by Nick Harrison
It's intellisense for SQL Server
Anyone who has ever worked with me, heard me speak, or read any of writings knows that I am a HUGE fan of Reflector. By extension, I am a big fan of Red - Gate
I have recently begun exploring some of their other offerings and came across this jewel.
SQL Prompt is a plug in for Visual Studio and SQL Server Management Studio. It provides several tools to make dealing with SQL a little easier for your friendly neighborhood developer.
When you a query window in a database, the plugin kicks in and gathers the metadata for the database that you are in. As you type a query, you get handy feedback like a list of tables after you type select. You can select one of the tables, specify * and then tab to expand the select clause to include all of the columns from the selected table. As you are building up the where clause, you are prompted by the names of columns in the selected tables.
If you spend any time writing ad hoc queries or building stored procedures by hand, this can save you substantial time.
If you are learning a new data model, this can greatly cut down on your frustration level.
The other really cool thing here is Format SQL. I have searched all over the place for a really good SQL formatter. Badly formatted SQL is so much harder to read than well formatted SQL. Unfortunately, management studio offers no support for keeping your SQL well formatted.
There are many tools available to format your SQL. Some work better than others. Some don't work that well at all. Most will give you some measure of control over how the formatted SQL looks. SQL Prompt produces good results and is easy to configure.
Sadly no tool is perfect, and what would we be without a wish list. There are some features that I would like to see:
Make it easier to paste SQL in and out of code. Strip off string builder, etc
Automate replacing hard coded values with bind variables or parameters
In addition to reformatting SQL, which is a huge refactor, support for other SQL refactors would be nice. Convert join to sub query and vice versa come to mind
Wish list a side, this is a wonderful tool that easily saves me an hour or more on most weeks.