Omer
Omer

Reputation: 10184

SQL Server intellisense does not refresh stored procedure and function list

I am trying to learn Microsoft SQL server 2014. I have defined some functions and stored procedures, but SQL server intellisence does not show latest ones and underlines them as an error.

enter image description here

Although SQL server shows as an error when I execute it works fine. My question is why SQL server underlines the statement, even though it works.

enter image description here

Upvotes: 8

Views: 5026

Answers (2)

Eric Petroelje
Eric Petroelje

Reputation: 60498

This will happen any time you create a new table, procedure, function, etc or modify a database object (add/remove columns on a table for example).

You just need to refresh the Intellisense cache to have it look for new objects. ctrl+shift+r should do the trick, or use the menu option Edit > Intellisense > Refresh Local Cache as one of the comments suggested

enter image description here

Upvotes: 17

Matt
Matt

Reputation: 551

To refresh the intellisense so it incorporates your latest stored procedures or table changes:

  1. Open any stored procedure (right-click and choose Modify)
  2. From the Menu, choose Edit > Intellisense > Refresh Local Cache

That should do it!

Upvotes: 3

Related Questions