squiggly line under table name

I have a table created in SQL Server 14.

Question: Why do I get squiggly red line after From under dbo.Cars?

How can I get rid of this?
LVL 34
Mike EghtebasDatabase and Application DeveloperAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Vikas GargAssociate Principal EngineerCommented:

If you have added new object to the table or modified the existing table structure that will not be known to SQL till you refresh the cache.

So after adding new table you need to refresh the structure, database and in the query window Shift+Ctrl+R
An interesting question - the Squiggly line usually means two things:

Intellisense doesn't know what you are talking about
You have a spelling mistake

Can you hover over the underlined line and see what pops up?  It should pop up something similar to this:

Intellisense PopupIf you make a mistake in the table name, hovering over it will give you a message similar to below:

Invalid Object NameThe thing is - Clearly the table name is correct, which leaves the other option - Spelling.  As far as I know, there is no spell check in SQL which means both of these suggestions are invalid.

Please can you hover over the underlined word and let us know what it's complaining about?

Tip: You can also turn off Intellisense, which will remove all squiggly lines - but that's not really a solution.  Right click the SQL Query background, and select "IntelliSense Enabled" - this is a toggle, and the icon to the left of it will either be highlighted (on) or not (off).  It might be worthwhile turning it off and back on to see if it re-analyses the script correctly.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Mike EghtebasDatabase and Application DeveloperAuthor Commented:
It runs okay as you can see in the image below meaning the table name is spelled correctly despite what the tool-tip text is saying.Cars2
But in this case "You can also turn off Intellisense," is what I am really need but it will be nice to figure out the real problem.



BTW, this one shows Sales.Cars because other than dbo.Sales, I created Sales.Cars also to see if I can remove the red line.

FYI, after turning IntelliSense off and on, Squiggly line again shows up.
Acronis True Image 2019 just released!

Create a reliable backup. Make sure you always have dependable copies of your data so you can restore your entire system or individual files.

Mike EghtebasDatabase and Application DeveloperAuthor Commented:
Hi Vikas,

Sorry for not noticing your post... brb

I had refreshed by a right-click on Tables/Refresh. It hadn't help any. I did it again but it didn't fix the problem.
Vikas GargAssociate Principal EngineerCommented:

You need to refresh on the database and then press Shift+Ctrl+R which will refresh your query window and that's it.
I hope that Vikas's suggestion will help - I know you've assigned the points to me already, but you can still give Vikas some points by clicking "Good Comment" (I think).  I don't know if it's possible to change an accepted answer after it's been set.  I'm also clicking "Good Comment" for Vikas - every little bit helps :)
Vikas GargAssociate Principal EngineerCommented:
Thanks lester,

Your description was good. We both knew what was the issue but your explanation was easy for  eghtebas so he gave you points.

Jim HornMicrosoft SQL Server Data DudeCommented:
>I had refreshed by a right-click on Tables/Refresh.
The menu action is Edit menu > Intellisense > Refresh Local Cache

Another possibility is that EE wasn't the active database, which appears in the lower right corner of the query window and wasn't in your screen shot.  So, change the database to EE, or run the below, then see if the squiggly lines are still there


Open in new window

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server

From novice to tech pro — start learning today.