Execute the Current Statement–SQL Prompt

I work for Redgate and write about products. I’ve got a series of SQL Prompt posts here on little things I like. SQL Prompt might be my favorite tool.  SQL Prompt will be yours as well if you give it a try.

This is a great little feature in SQL Prompt that I wrote about at SQLServerCentral. It’s Current statement Execution, which comes about from pressing Shift+F5. Whatever statement the cursor is on, whether it’s a single line or multi-line, the statement will execute.

It can be on the first line:

currentstatemnt_e

the last line

currentstatemnt_f

the end of the line

currentstatemnt_g

It doesn’t matter. When I press Shift+F5 in all of these cases, I get this:

currentstatemnt_c

Only the second statement executed (the SELECT), the first statement is ignored (and all other statements) and the code executed is highlighted.

As mentioned at SQLServerCentral, there’s a caveat. This isn’t really highlighting, it’s just coloring. Read the article to understand the difference.

I also have a video version of my tip.

You can see a complete list of SQL Prompt tips at Redgate.

About way0utwest

Editor, SQLServerCentral
This entry was posted in Blog and tagged , , . Bookmark the permalink.