[Go] database query sysobjects

Source: Internet
Author: User
Tags scalar

sysobjects

Sysobjects is a system-built table that stores each object created in the database (constraints, defaults, logs, rules, stored procedures, and so on), one row per table. Only within tempdb , each temporary object occupies one row in the table.

1. Fields in the Query data table eshop the database name tbadmin to the table name

Use EShop
Select Name= "Name" from syscolumns
where id=object_id (N ' dbo. Tbadmin ')

2. Querying tables in the database

Select name from EShop. sysobjects where type= ' u '

Column Name Data Type Description
Name sysname The name of the object.
Id Int The object identification number.
Xtype CHAR (2) object type. Can be one of the following object types:

c = CHECK constraint
d = Defaults or DEFAULT constraint
f = FOREIGN KEY constraint
l = log
FN = Scalar function
if = inline table function
p = stored procedure
PK = PRIMARY KEY constraint (type K)
RF = copy filter stored procedure
s = system table
TF = Table function
TR = Trigger
uq = UNIQUE Constraint (type is K)
v = view
x = extended Stored Procedure

Uid smallint The user ID of the owner object.
Info smallint Keep. Internal use only.
Status Int Keep. Internal use only.
Base_schema_
Ver
Int Keep. Internal use only.
Replinfo Int Keep. For replication use.
Parent_obj Int The object identification number of the parent object (for example, for a trigger or constraint, which is the table ID).
Crdate Datetime The date the object was created.
Ftcatid smallint Full-text catalog identifier for all user tables registered for full-text indexing, or 0 for all user tables that are not registered.
Schema_ver Int The version number, which is incremented each time the schema of the table changes.
Stats_schema_
Ver
Int Keep. Internal use only.
Type CHAR (2) object type. Can be one of the following values:

c = CHECK constraint
d = default value or DEFAULT constraint
f = FOREIGN KEY constraint
FN = Scalar function
if = inline table function
k = PRIMARY KEY or UNIQUE constraint
l = log
p = stored procedure
r = Rule
RF = copy filter stored procedure
s = system table
TR = Trigger
u = User table
v = view
x = extended Stored procedure

Userstat smallint Keep.
Sysstat smallint Internal state information.
Indexdel smallint Keep.
Refdate Datetime reserved for later use.
Version Int reserved for later use.
Deltrig Int Keep.
Instrig Int Keep.
Updtrig Int Keep.
Seltrig Int Keep.
Category Int Used for publishing, constraints, and identification.
Cache smallint Keep.

[Go] database query sysobjects

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.