A_Pointar A_Pointar - 3 months ago 12
SQL Question

How do I search for a table in sql 2005?

I just created a table within a huge database and saved it. I've tried to refresh the database to see if my new table appears and I closed & reopened the Management Studio but don't see my new table. I was wondering if there is a way to search for my new created table? I'm using SQL Server 2005.
Thanks a lot.

Answer

You can try this:-

 SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[table_name_here]')

or try this:-

 USE YourDBName
 GO 
 SELECT *
 FROM sys.Tables
 where name like '%tablename%'
 GO