Gerrit ten Napel
Gerrit ten Napel

Reputation: 149

Invalid object name in SQL Management Studio

I've been creating a database for class and I'm having trouble seeing my tables. I have a total of 12 tables I have created, 3 via CREATE TABLE statements and the rest using the SQL Server Management Studio, I'm trying to enter an INSERT INTO statement but it's not recognizing the table that I have created.

enter image description here

enter image description here

Here are some screenshots with what I'm working with.

Upvotes: 1

Views: 28204

Answers (3)

SmartDev
SmartDev

Reputation: 13

Make sure your stored procedure is not dropping your table or temp table anytime it is executed. To do so double check your Stored procedures code and make sure you comment DROP TABLE your_temp_Table or comment DROP TABLE your_Table .

Upvotes: 0

Brad123
Brad123

Reputation: 944

I just saw this error on my SQL server as well. Here's how I solved it: Problem:

select * from table_name;

error:

Msg 208, Level 16, State 1, Line 1
Invalid object name 'table_name' 

--> But I know it's there

Solution:

select * from DBname.dbo.table_name

Upvotes: 3

LONG
LONG

Reputation: 4620

First refresh the Tables in your database to check whether that table existed or not.

If it does exist, check your SQL connection on your current session, make sure you are connecting to the correct server instance.

Upvotes: 2

Related Questions