Search SQL Server table

1

I'm working with a database with a huge amount of tables and views. The program that calls that database peta and gives me an error when it tries to call a certain table. Is there any option to look up that table? Search engine or something?

    
asked by Miguel 12.03.2018 в 12:24
source

3 answers

1

Have you tried using SHOW TABLES; ?, With this option you can consult the tables in your database.

If not, you can also use SELECT * FROM sys.tables , as it comes in the documentation link

    
answered by 12.03.2018 / 12:34
source
1

It is possible that your error has some relation with the scheme of the table and the permissions that the user with whom you are trying to use the object has.

The default scheme is .dbo, see if the table is that way and if the user has permissions on that object.

Additionally, you can search for a table with any of the following instructions:

select *
from INFORMATION_SCHEMA.TABLES

select * 
from sys.tables


select * 
from sysobjects
where xtype = 'U'
    
answered by 12.03.2018 в 16:21
-1

For the tables:

select * from sysobjects 

If you want to search columns

select * from syscolumns 

And you can also do a join between the two.

If you want to see the structure select the table and give it Alt + F1 , in case it does not exist it will send you a message.

    
answered by 17.05.2018 в 23:33