All my blogs with #SQLSERVERLearning is intended to cover all stuff identified as difference between Oracle and SQL Server.
Hopefully it might be helpful for Oracle guy also working in SQL Server world.
For complete list of topics on SQL Server, please check Menu – SQL Server Learning.
After setting CTRL-ENTER as shortcut for running a SQL statement was feeling kinda cool, now can run query in my usual way!
For exploring how to change shortcut for query executions please check here
But wait SQL Server had some new problem area to get unfold and frankly speaking really annoying for any Oracle Guy!
Whenever we run a single statement without selecting statement, we end up running entire statement in Query Editor!
YES Entire statement!, Not sure why the need for same.
Thought let google the answer, But no forum or blog were able to provide Simple-Single-Shortcut to Execute Current Highlighted statement.
SQL Developer Allows that and it make sense, why any one would want to run and each and every statement with in a query editor as Day to Day normal Executions.
Its should be up to us on what we need to execute, Current statement or set of statement without Selecting SQL text every-time for executions.
Found some Add On, Plug in but everyone don’t have leverage to install external software.
If some one have any better way to execute current statement, will be keen to get help.
Currently using below methods to run individual SQL statement.
IF ( SQL statement Text is with in single line )
1. SHIFT – Upper Arrow
Select Text to run
2. Then use already Set Shortcut to Run SQL Statement, CTRL- ENTER.
Thought lets try to use Collapse and Expand options to run SQL having text across multiple lines or formatted queries.
Using Keyboard Shortcuts, had set new Shortcut for Collapse and Expand options in SQL Server Query Editor.
For Execution now need to follow following options.
1. Collapse SQL Text using ALT-C
2. Repeat Steps Mention in above IF Clause.
I know these all problems are non technical,but having ease on analysis and running SQL efficiently equally matter.