Like a very long time Toad for Oracle user, I've become accustomed to striking Control+Enter and getting only the statement underneath the cursor be performed.

In SQL Server Management Studio, striking F5 runs the whole script. To operate only the current statement, I must by hand highlight the statement I would like, after which hit F5.

That's really annoying in my experience. Does anybody are conscious of something having a keyboard shortcut to operate only the current statement on the SQL Server? I'd change tools only for that one feature.

Note: Strangely enough, the free Toad for SQL Server doesn't allow you to run only the statement underneath the cursor.

Ok, what exactly I am getting all these solutions is "No, that's difficult.Inch


This is how I could do that:

1 - Download SQL Developer

2 - Download the jTDS driver

3 - Follow these instructions to include that driver to SQL Developer

4 - Connect with SQL Server using SQL Developer (awesome!)

5 - Run it and existence is nice

I do not think you could do to complete with the management studio. BUT you should use keyboard shortcut software (e.g. to possess a special sequence recorded and designated to some hotkey. Inside your situation you'll need:


This can choose the present line and carry it out.

Hit Control-E while text is outlined.

I personally use a workaround: I comment queries I am not using. You should use Control-K, Control-C to comment the SQL you've outlined. Use Control-K, Control-U to uncomment. This way, you are able to comment other queries, and execute the main one you are thinking about with F5.

Note: Strangely enough, the free Toad for SQL Server doesn't allow you to run only the statement underneath the cursor.

It really is annoying that TOAD doesn't hold as to the it promises:

From TOAD help: [F9 to complete] some of the statement, which could contain a number of claims. You are able to choose the area of the statement by placing the cursor within or next to the statement, or by choosing the statement. Note: Toad views "adjacent" all claims (including comments) separated in the cursor or from one another by less than two blank lines. If the error happens throughout statement execution, a mistake message shows, permitting you to definitely either disregard the error and continue in order to abort execution.

I attempted it million occasions however it simply executes the entire script. I needed to look for this within the user support group (toadss(at) but yahoo has got the stupidest search facility ever! It cannot even discover the keyword "toad" within the toad mail group, DOH!

I believe TOAD is the greatest querying tool ever, but the possible lack of this feature really annoys me too.

UPDATE: SOLUTION FOUND! I requested this problem in toadss mail group and also got the solution. Unlike Oracle, you need to separate claims in SQL Server using the keyword GO after each statement. Only when you accomplish that the F9 button works not surprisingly, performing the present statement.

Whether it's the needing to move your hands towards the mouse part that bothers you, you are able to contain the Control lower while striking an up or lower arrow answer to choose a line at the same time.

you can always make use of the command line tools sqlcmd and osql. Used to do lots of sybase all in the unix command line utilizing a wrapper function that passed my command string in to the equivalent (that we think was isql?). I made use of mire to, so perhaps I had been just crazy then -)