Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2000 > SQL Server 2000
|
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 28th, 2004, 07:47 AM
Registered User
 
Join Date: Nov 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default How do we differentiate b/w User and Sys tables

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


 
Old May 28th, 2004, 12:02 PM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 336
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to alyeng2000
Default

what do you mean by differentiate between them???
you can observe that system table names starts with "sys"


Ahmed Ali
Software Developer
 
Old May 28th, 2004, 12:06 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Hello,

If you select from the sysobjects table, the field xtype can be used to make that determination. This char(2) field uses the following table values:

S = System table
U = User table
V = View

This is apart from the fact that most system tables start with sys, other than the dtproperties table.

I don't know if you can differentiate between these two types using the INFORMATION_SCHEMA.TABLES or another of the INFORMATION_SCHEMA views.

Brian
 
Old May 29th, 2004, 12:04 AM
Registered User
 
Join Date: Nov 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by bmains
 Hello,

If you select from the sysobjects table, the field xtype can be used to make that determination. This char(2) field uses the following table values:

S = System table
U = User table
V = View

This is apart from the fact that most system tables start with sys, other than the dtproperties table.

I don't know if you can differentiate between these two types using the INFORMATION_SCHEMA.TABLES or another of the INFORMATION_SCHEMA views.

Brian
Dear Brian,

Thanks 4 the help given.

My question was actually,

Can we change a sys table to a user table in a database.

Thanks

Anil Mahadev

Software Dev 2 Da Max

 
Old May 29th, 2004, 04:30 PM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 336
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to alyeng2000
Default

first:
i am asking what is the user table advantages so i need to change the sys table to a user table.
secoded:
if you change for example the name of system table all sys procedure and views will fail.

you can get the system tables data after inserting it in separate temperory table like follows:

select * into #table1
from dbo.syscolumns


Ahmed Ali
Software Developer
 
Old May 30th, 2004, 08:39 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Hello,

You have to look at some of the change object procedures for that. I don't believe so, because the system tables are needed by SQL Server. Why do you need to do this?

Brian





Similar Threads
Thread Thread Starter Forum Replies Last Post
IE Errormessege Error "Sys" undefined chandana ASP.NET 2.0 Professional 1 August 12th, 2008 11:35 AM
Indexing tables in user defined functions A17560127 SQL Server 2005 1 July 21st, 2008 03:56 AM
drop user from sys.server_principals priyaram SQL Server 2005 1 March 12th, 2007 10:42 AM
Select to all user tables in db Moueg SQL Server 2000 5 December 13th, 2004 10:56 AM
How to differentiate to number lists gilgalbiblewheel Java GUI 0 September 15th, 2004 07:22 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.