Problems finding table in sql

Asked

Viewed 160 times

0

When I use o Select * From table_x and I’ll put my table, the SQL cannot find the specified table?

  • 1

    Is in the correct database?

  • What return do you get when you have your command executed? Or are you talking about the auto complete DBMS?

  • What do you mean by "SQL doesn’t think it" ? Are you referring to Intellisense? which gives you "hints" of objects, commands and functions? Or when you run the "select * from table" command, where the table actually exists in your database, does sql-server return an error? Send more details please.

  • Try it. USE SeuBanco
GO

SELECT * FROM dbo.Tabela

2 answers

1

You probably created the table in your user’s context

Do the following check

//esse é o padrão
Select * from banco.dbo.tabela
//Sua tabela esta assim provavelmente
Select * from banco.seu_usuario.tabela

0

Try to pass in command the name of the database, too, would look something like this:

SELECT * FROM seu_banco.minha_tabela;

The times I had related problems, I used so and it worked!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.