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
 Difference between xtype and type columns in ....

Author  Topic 

mageshks
Yak Posting Veteran

59 Posts

Posted - 2007-02-06 : 10:41:34
Hi

Difference between xtype and type columns in sysobjects table?

Thanks in advance...

Regards
Magesh

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-02-06 : 10:45:48
I think type is the column to use, and xtype was included orignally for "future uses".


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2007-02-06 : 11:13:01
I think that type is the original column, and xtype came along with a "richer" value - in SQL Server Version 7 I think. But goodness knows why it was though necessary ...

And sysobjects is on the way out in SQL 2005 ...

There are a couple of values that are in one, and not the other, and vice versa.

xtype can be used to establish that a KEY is PK or UNIQUE (type = 'K')

Type 'R' = Rule, not present in xtype

and probably a couple more ...

Search BoL for "sysobjects" for the full monty

Kristen
Go to Top of Page
   

- Advertisement -