When does below error occur?

Msg 208, Level 16, State 1, Line 1
Invalid object name 'dbo.employee_master'.

 Posted by vishalneeraj-24503 on 11/28/2013 | Category: Sql Server Interview questions | Views: 2452 | Points: 40
Answer:

When we have not set DB, in which the associated table has been created.Then we must set DB first,then we can use query.For setting DB,we can have "USE" keyword followed by DB_Name as shown below:-

Use DB_Name
Select * from db.employee_master;

Then above error will not come, and query will produce result.


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response