I recently created a database called “testDB” and when I typed “USE testDB” in the SSMS Query window it gave me a little red squiggly underline (see below snapshot).Why did this happen when I just created a new database? That’s because the local IntelliSense cache hasn’t updated yet.
How to Refresh IntelliSense Cache in SSMS
If you want to force the IntelliSense Cache to update, go to Edit, then IntelliSense, then click “Refresh Local Cache.” (See snapshot below)
That should refresh your IntelliSense Cache and remove all those annoying red squiggly underlines!