October 19, 2005 at 12:14 pm
Can anyone tell me if either the xtype or type field is one that should be used predominantly? They appear to contain identical information except that xtype includes a value of "UQ" for Unique Constraint.
Over the years I've seen both used a lot. They appear to be largely interchangeable but I'm wondering if one is better to use for any reason.
Thanks.
October 19, 2005 at 12:28 pm
i'd have to agree with you, with the exception of referencing PK's:
select * from sysobjects where xtype <> type
XTYPE of 'PK' <> TYPE of 'K' was the only difference i could find, so generally i'd agree they were interchangable; maybe someone else will have another answer.
Lowell
October 19, 2005 at 5:12 pm
xtype is what should be used. type is included for backward compatability.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply