Shortcut: Manually prompting for and refreshing Intellisense in SSMS

Intellisense is one of the best things that's ever been added to Visual Studio or to SQL Server Management Studio (SSMS). It's hard to remember back to before it was added, or how we worked then.

I had a young friend from the United Kingdom who had just completed a Computer Science degree and one of the things that he was most proud of, is that he knew so many HTML tags and which attributes went with which tags. When I showed him HTML Intellisense in Visual Studio, I think he was about to cry.

While Intellisense in SSMS pretty much works as expected, there are a few things that can go wrong to confuse it.

The first problem is that it caches the list of objects to make sure it can perform quite well. But the cache can get out of sync with reality. A common cause of that is if I execute T-SQL commands in one query window, and I'm using those same objects in another window.

I've seen people quite puzzled about this but it's easy to fix. On the Edit menu, you can see that the shortcut key to refresh the local cache is Ctrl-Shift-R:

So if you see a bunch of unexpected "red squigglies", first thing to do is to hit Ctrl-Shift-R.

Another thing that can happen is that you get into a situation where the prompted values won't appear. If I type the following code:

note that the Intellisense has appeared. But if I hit the Escape key, it will disappear again. So users wonder how to get it back. Now one option is to backspace over the period, then type the period again. The standard option though, is to hit Alt-RightArrow.

An alternative to this is to hit Ctrl-Space, and that's easier to hit anyway.

Leave a Reply

Your email address will not be published. Required fields are marked *