Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
818 views
in Technique[技术] by (71.8m points)

database - How can I run just the statement my cursor is on in SQL Server Management Studio?

As a long time Toad for Oracle user, I have gotten used to hitting Ctrl+Enter and having just the statement under the cursor be executed.

In SQL Server Management Studio, hitting F5 runs the entire script. To run just the current statement, I have to manually highlight the statement I want, and then hit F5.

That is really annoying to me. Does anyone know of a tool with a keyboard shortcut to run just the current statement on a SQL Server? I would change tools just for this one feature.

Note: Oddly enough, even the free Toad for SQL Server does not let you run just the statement under the cursor.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Use Ctrl+KU to select a line. Then use F5 to run it.

Although it only works for single line selection, still I find it quite useful.

Hope it helps!!


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...