"Invalid object name" error.

Chaitanya Kiran Buduguru 176 Reputation points
2021-06-08T14:44:16.173+00:00

I have a table that exists in the database. When I run "Select * from tablename" , it executes successfully .But when I am running "Insert into tablename values()", it is giving me the below error:

"Invalid object name tablename"

The table exists in the database, but getting "Invalid object name" error.

For Select query, it executes successfully. But for Insert query it is giving "Invalid object name" error.

Please help on resolving this issue.

SQL Server | Other
{count} votes

7 answers

Sort by: Most helpful
  1. Scott Donalson 1 Reputation point
    2022-03-30T22:45:10.343+00:00

    I was having that problem when I was connected to two separate servers. I had to disconnect specifically from each one, restart SSMS, and then it worked. I guess make sure you are only connected to 1 server.

    0 comments No comments

  2. Dayneko 1 Reputation point
    2022-04-15T06:59:41.477+00:00

    I also encountered this problem, and as it turned out, after updating the DEV stand. The table is gone, but I have it displayed. It was necessary to restart the DBMS

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.