aarona
aarona

Reputation: 37344

Intellisense not updating in Sql Server

Given: A table named Table1 that has the following columns:

Typing Table1. in Microsoft SQL Server Management Studio provides me with a list of columns for that table.

Scenario:

I open up Table1 in the design view and add ColumnC to it. I save Table1 and refresh it to see the new column, Column3 show up in the Object Explorer.

Going back to the Query Window, I type Table1. but Column3 is not available to be selected. Typing it out gives me a syntax error but running a query with the column in it works as expected.

Is there a menu item somewhere that I need to click to get Intellisense to pick up the DDL changes I have made?

Upvotes: 19

Views: 7266

Answers (3)

Seamus23
Seamus23

Reputation: 49

In addition to refreshing the cache you also need to do the following if you haven't already:

Go to Tools >> Options >> Text Editor >> Transact-SQL >> General >> IntelliSense

Check the box Auto List Members and also the box Parameter Information save and restart.

I also highly recommend the Redgate SQL Toolbox if you regularly use SQL Server. SQL Compare and SQL Data Compare and the SQL Prompt5 have saved me lots of time in development.

Upvotes: 3

nycdan
nycdan

Reputation: 2849

Edit -> Intellisense - Refresh Local Cache

That should do it.

Ctrl-Shift-R is the shortcut.

Upvotes: 49

dustyhoppe
dustyhoppe

Reputation: 1813

I have to restart management studio when this happens. Refreshing object explorer doesn't update the intellisense.

Upvotes: 0

Related Questions