SQL SERVER – Switch Between Two Parenthesis using Shortcut CTRL+]

Earlier this week I wrote a blog post about SQL SERVER – CTRL+SHIFT+] Shortcut to Select Code Between Two Parenthesis, I received quite a lot of positive feedback from readers. If you are a regular reader of the blog post, you must be aware that I appreciate the learning shared by readers.

Here is another interesting shortcut shared by another SQL Server Expert – Suvendu. He has suggested that using shortcut CTRL+] one can jump between two parenthesis in the code. This is indeed interesting. You can try it out using the following script.

SELECT *
FROM (SELECT *
FROM (SELECT *
FROM (SELECT *
FROM Sales.Currency)a)b)c

Now, move your mouse right behind b (which is highlighted).

SELECT *
FROM (SELECT *
FROM (SELECT *
FROM (SELECT *
FROM Sales.Currency)a)b)c

Now press CTRL+] and you will see that it jumps from b to the opening parenthesis.

SELECT *
FROM (SELECT *
FROM (SELECT *
FROM (SELECT *
FROM Sales.Currency)a)b)c

You can once again press CTRL+] and it will jump back to parenthesis after b.

SELECT *
FROM (SELECT *
FROM (SELECT *
FROM (SELECT *
FROM Sales.Currency)a)b)c

Small but very useful tip. Try it out and let me know if there is any other important shorcut I should highlight on the blog.

Reference: Pinal Dave (https://blog.sqlauthority.com)

Previous Post
SQL SERVER – Effect of Case Sensitive Collation on Resultset
Next Post
SQL SERVER – Example of Width Sensitive and Width Insensitive Collation

Related Posts

5 Comments. Leave new

Leave a Reply Cancel reply

Exit mobile version