Database Query sysobjects

Source: Internet
Author: User
Tags scalar
Sysobjects

Sysobjects is a system-created table that stores each object (constraints, default values, logs, rules, stored procedures, etc.) created in the database. Each table occupies one row. OnlyTempdbEach temporary object occupies a row in the table.

1. The eshop field in the query data table is the database name tbadmin and the table name.

Use eshop
Select name = "name" from syscolumns
Where id = object_id (N 'dbo. tbadmin ')

2. query tables in the database

Select name from eshop .. sysobjects where type = 'U'

 

Column name Data Type Description
Name Sysname Object Name.
ID Int Object ID number.
Xtype Char (2) object type. It can be one of the following object types:

C = check constraints
d = default value or default constraint
F = foreign key constraint
L = Log
fn = scalar function
If = nested table functions
P = Stored Procedure
PK = primary key constraint (type: K)
Rf = copy and filter the Stored Procedure
S = system table
TF = table function
TR = trigger
U = User table
uq = unique constraint (type: K)
V = view
X = Extended Stored Procedure

UID Smallint User ID of the owner object.
Info Smallint Retained. For internal use only.
Status Int Retained. For internal use only.
Base_schema _
Ver
Int Retained. For internal use only.
Replinfo Int Retained. For replication.
Parent_obj Int ID of the parent object (for example, this ID is the table ID for triggers or constraints ).
Crdate Datetime Object creation date.
Ftcatid Smallint The full-text directory identifier of all user tables registered for the full-text index. The value is 0 for all user tables not registered.
Schema_ver Int Version number, which is added each time the schema of the table is changed.
Stats_schema _
Ver
Int Retained. For internal use only.
Type Char (2) object type. It can be one of the following values:

C = check constraints
d = default value or default constraint
F = foreign key constraint
fn = scalar function
If = nested table functions
K = primary key or unique constraints
L = Log
P = Stored Procedure
r = rule
Rf = copy and filter the Stored Procedure
S = system table
TF = table function
TR = trigger
U = User table
V = view
X = Extended Stored Procedure

Userstat Smallint Retained.
Sysstat Smallint Internal status information.
Indexdel Smallint Retained.
Refdate Datetime For future use.
Version Int For future use.
Deltrig Int Retained.
Instrig Int Retained.
Updtrig Int Retained.
Seltrig Int Retained.
Category Int Used for publishing, binding, and identification.
Cache Smallint Retained.

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.