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 (http://blog.sqlauthority.com)

About these ads

6 thoughts on “SQL SERVER – Switch Between Two Parenthesis using Shortcut CTRL+]

  1. Thanks Pinal Sir for the appreciation. This post is perfectly alright except the part ‘SQL Server Expert’ because I am still in the ‘Beginners’ level. However, your recognition and appreciation motivates me to learn more.

    Like

  2. Pingback: SQL SERVER – Weekly Series – Memory Lane – #037 | Journey to SQL Authority with Pinal Dave

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s