Re: Finding out user tables in database
Use this statement instead:
TABLE_TYPE = 'BASE TABLE'
BTW - a better group would be microsoft.public.sqlserver.programming.
This on is dedicated to SQL Server Notification Services.
SQL Server MVP
Get up to speed quickly with SQLNS
I support PASS, the Professional Association for SQL Server.
On 21 Dec 2005 20:28:10 -0800, "Mana" <[email protected]> wrote:
>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.
>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?