Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 How can I find a table in table list of database?

Author  Topic 

Fateme
Starting Member

13 Posts

Posted - 2010-07-27 : 19:47:03
Hi everyone,
I have a database with a lot of tables, quarys, views and storedprocedures.
I am looking for a table that I cannot see it's name in table list under database, but I can select data from that table.
As I know,I cannot select data from a deleted table,but I am not sure what happend for that table

I'll appreciate for any help.

Regards,
Fateme

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-07-27 : 19:51:05
If you can query it, then it's in there. Perhaps you are looking in the wrong database or it's owned by a different user than what you are expecting.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

Fateme
Starting Member

13 Posts

Posted - 2010-07-27 : 20:15:19
Thanks Tara for your reply.
I am sure that the database that I am looking for in is correct, but perhaps its owned by different user.
Is there any way to see list of all tables that are owned by any user in a database ?

Thanks,
Fateme
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-07-27 : 20:17:26
You can query INFORMATION_SCHEMA.TABLES view.

USE YourDBName
GO

SELECT * FROM INFORMATION_SCHEMA.TABLES

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

Fateme
Starting Member

13 Posts

Posted - 2010-07-27 : 20:23:44
Thanks a lot.
My problem's solved.

Regards,
Fateme
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-07-27 : 20:24:10
You're welcome.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
   

- Advertisement -