Invalid Column name but still working

元气小坏坏 提交于 2019-12-11 12:32:32

问题


When I connect to the server name using it's name SQL is showing red lines under the code and stating things like column invalid or object invalid. But the code stills runs. When I connect to the server using it's IP I do not get the red lines and the code also runs.

Can I trust the data when using the name? Also why is it doing this?

I am using SSMS 2012 to access a brand new 2012 server.


回答1:


Did you make the column since the last time you refreshed your local intellisense cache? Try doing that and seeing if it shows as valid.

Edit -> Intellisense -> Refresh Local Cache and then ctrl + Shift + R

Give that a shot and see if it works for you.



来源:https://stackoverflow.com/questions/28310089/invalid-column-name-but-still-working

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