May 28, 2004 at 6:43 am
How do we differentiate between USer tables and System Tables in SQL Server
Thanks
Plz Reply ASAP
Best Regards
Anil Mahadev
Software Dev 2 Da Max
May 28, 2004 at 3:34 pm
How do you mean. There are many ways tables can be viewed and each has a specific way. FOr instanes if you are querying sysobjects in a db then use
select * from sysobjects where xtype = 'u' and status > 0
June 2, 2004 at 3:23 pm
To expand ever so slightly on Antares686's response -
In sysobjects,
xtype = 'u' is a user table
xtype = 's' is a system table
and sysobjects is a system table in each database that contains information about all of the "objects" in the database.
Steve
June 3, 2004 at 6:18 am
Just and additional comment.
The
status > 0
is added to cover items like dtproperties which is a system table but marked as a user table. All system objects have a bitmask applied that makes status a negative number which covers dtproperties as well.
June 3, 2004 at 9:56 am
Antares686,
I did not know that, thank you!!!
Steve
Viewing 5 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy