You are here:

MS SQL/sql server 2012


i was facing a weird problem with sql server 2012 express,(in object explorer the table is showing after creation, but when i was using querys,red color under line showing "invalid object name employee" error.  And its executing query,table is diplaying in out put

For clear understanding i attached a image,see carefully.the error does not show when i re- run the every time i have to re run the SSMS(management studio) after creating tables and databases.

************************PLEASE HELP ME***********************************

Hi Santhosh

Don't worry, there is NO problem with what you are experiencing. This is basically how SSMS works.

When you connect and use a DB all the objects (tables, views, procedures etc.) are cached for intelliSense. So, you should refresh the same manually when you create a new object (tables, views, procedures etc.) and that's the reason you see that red line (because the object you created is NOT there in cache).

You just need to refresh after creating, and that's it.

Go to Edit -> IntelliSense -> Refresh Local Cache and 2) Hit Ctrl+Shift+R



All Answers

Answers by Expert:

Ask Experts


Mohit Nayyar


Microsoft SQL Server: T-SQL development (stored procedures, triggers, functions), Database optimization, performance tuning, high availability (Clustering, Log Shipping, Mirroring, Replication), scalability, SQL Server migration (Sybase/Oracle to SQL Server), SSIS/DTS, Data Warehousing (Kimball Methodology), ETL (SSIS), Cube (SSAS), Reporting Services (SSRS), database modeling, database administration, Security implementation and typically anything related to Microsoft SQL Server.


With over 10 years of experience in Database Administration, Development, Business Intelligence solutions and managing enterprise level database solutions based on Microsoft SQL Server.
IT Magazine: ASP, SQL

IT Magazine: ASP, SQL

MCA (Masters)

Awards and Honors
Brainbench Certified: RDBMS
MCTS: DBA/Developer/BI for SQL Server 2005/SQL Server 2008
MCITP: DBA/Developer/BI for SQL Server 2005/SQL Server 2008
MCDBA: SQL Server 2000
MCP: SQL Server 6.5

©2016 All rights reserved.