Lost the IntelliSense in SQL Server Management Studio

丶灬走出姿态 提交于 2019-11-26 21:15:57

问题


I am running SQL-2008 R2 Server.

Usually when I write a query, I get a full-versed IntelliSense displaying all the objects in my Database.

But now when I was onto a task, it showed no IntelliSense. Instead, when I wrote the object names, it showed that object is invalid! However, running the Query gives correct results.

I shut-down the Management studio and restarted it. Now all works fine.

I wanna know what was actually wrong. Any ideas?


回答1:


You probably needed to refresh it. Either

  1. Go to Edit -> IntelliSense -> Refresh Local Cache
  2. Use Ctrl+Shift+R



回答2:


From another question I answered... there is way to auto fresh without having to manually do Control Shift R time.

I found an addin that offers a free community edition addin. SSMS Boost offers some helpful features that bypass the shortcomings of SSMS.

To auto refresh, I setup the shortcut for F5 to Run Query and then Auto Refresh Intellisense. Now, everytime I execute, my intellisense cache is automatically refreshed. Seems to replicate the functionality of auto refresh in Red Gate's SQL Prompt Experimental functionality.




回答3:


To activate IntelliSense for Column Names:

First type the FROM clause (FROM tblEmps), then second, go back and type the SELECT clause (SELECT EmpID, LName).

This way IntelliSense will help you pick out the Column Names to include in your SELECT statement.

SELECT __________
FROM tblEmps

The trick here is to type the FROM clause prior to typing the SELECT clause, so IntelliSense knows which Columns to suggest.




回答4:


A picture is worth a 1000 words.



来源:https://stackoverflow.com/questions/7055911/lost-the-intellisense-in-sql-server-management-studio

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!