microsoft.public.sqlserver.notificationsvcs
[Top] [All Lists]

Finding out user tables in database

Subject: Finding out user tables in database
From: "Mana"
Date: 21 Dec 2005 20:28:10 -0800
Newsgroups: microsoft.public.sqlserver.notificationsvcs
Hi,

I need to find out all the user tables in a database. For this purpose
I have written following query. NSBank is the name of the database.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
USE NSBank;
select name, type_desc from sys.objects where type='u';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

When I execute this, I get the names of all the user tables along with
the table 'sysdiagrams' which is a system table, created as a result of
relationships between other tables in the database. How should I modify
my query to omit this table from the result set?

Thanks,
Mana


<Prev in Thread] Current Thread [Next in Thread>