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
 General SQL Server Forums
 New to SQL Server Programming
 SELECT all tables from sys.tables, but not diagram

Author  Topic 

Angate
Starting Member

24 Posts

Posted - 2010-11-30 : 10:54:31
I have a database that I am trying to retrieve a list of tables from. I can do this easily enough with:

SELECT name FROM sys.tables


The issue is that the result set also contains sysdiagrams. Is there some attribute I can filter on that would remove this table from my result set? I could filter on my naming convention, but that isn't as exacting as I would like.

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2010-11-30 : 11:48:01
WHERE is_ms_shipped = 0
Go to Top of Page

Angate
Starting Member

24 Posts

Posted - 2010-12-01 : 14:36:31
is_ms_shipped is false on all of the tables that are returned.
Go to Top of Page
   

- Advertisement -