Skip to content

Latest commit

 

History

History
66 lines (60 loc) · 6.15 KB

File metadata and controls

66 lines (60 loc) · 6.15 KB
description sys.sysobjects (Transact-SQL)
title sys.sysobjects (Transact-SQL) | Microsoft Docs
ms.custom
ms.date 03/15/2017
ms.prod sql
ms.prod_service database-engine, sql-database, synapse-analytics, pdw
ms.reviewer
ms.technology system-objects
ms.topic reference
f1_keywords
sys.sysobjects_TSQL
sysobjects
sysobjects_TSQL
sys.sysobjects
dev_langs
TSQL
helpviewer_keywords
sys.sysobjects compatibility view
sysobjects system table
ms.assetid 44fdc387-67b0-4139-8bf5-ed26cf640cd1
author rwestMSFT
ms.author randolphwest
monikerRange >=aps-pdw-2016||=azure-sqldw-latest||>=sql-server-2016||>=sql-server-linux-2017||=azuresqldb-mi-current

sys.sysobjects (Transact-SQL)

[!INCLUDE sql-asdbmi-asa-pdw]

Contains one row for each object that is created within a database, such as a constraint, default, log, rule, and stored procedure.

Important

[!INCLUDEssnoteCompView]

Column name Data type Description
name sysname Object name
id int Object identification number
xtype char(2) Object type. Can be one of the following object types:

AF = Aggregate function (CLR)

C = CHECK constraint

D = Default or DEFAULT constraint

F = FOREIGN KEY constraint

L = Log

FN = Scalar function

FS = Assembly (CLR) scalar-function

FT = Assembly (CLR) table-valued function

IF = In-lined table-function

IT = Internal table

P = Stored procedure

PC = Assembly (CLR) stored-procedure

PK = PRIMARY KEY constraint (type is K)

RF = Replication filter stored procedure

S = System table

SN = Synonym

SO = Sequence

SQ = Service queue

TA = Assembly (CLR) DML trigger

TF = Table function

TR = SQL DML Trigger

TT = Table type

U = User table

UQ = UNIQUE constraint (type is K)

V = View

X = Extended stored procedure
uid smallint Schema ID of the owner of the object. For databases upgraded from an earlier version of [!INCLUDEssNoVersion], the schema ID is equal to the user ID of the owner. Overflows or returns NULL if the number of users and roles exceeds 32,767.

** Important ** If you use any of the following [!INCLUDEssNoVersion] DDL statements, you must use the sys.objects catalog view instead of sys.sysobjects.

CREATE | ALTER | DROP USER

CREATE | ALTER | DROP ROLE

CREATE | ALTER | DROP APPLICATION ROLE

CREATE SCHEMA

ALTER AUTHORIZATION ON OBJECT
info smallint [!INCLUDEssInternalOnly]
status int [!INCLUDEssInternalOnly]
base_schema_ver int [!INCLUDEssInternalOnly]
replinfo int [!INCLUDEssInternalOnly]
parent_obj int Object identification number of the parent object. For example, the table ID if it is a trigger or constraint.
crdate datetime Date the object was created.
ftcatid smallint Identifier of the full-text catalog for all user tables registered for full-text indexing, and 0 for all user tables that are not registered.
schema_ver int Version number that is incremented every time the schema for a table changes. Always returns 0.
stats_schema_ver int [!INCLUDEssInternalOnly]
type char(2) Object type. Can be one of the following values:

AF = Aggregate function (CLR)

C = CHECK constraint

D = Default or DEFAULT constraint

F = FOREIGN KEY constraint

FN = Scalar function

FS = Assembly (CLR) scalar-function

FT = Assembly (CLR) table-valued functionIF = In-lined table-function

IT - Internal table

K = PRIMARY KEY or UNIQUE constraint

L = Log

P = Stored procedure

PC = Assembly (CLR) stored-procedure

R = Rule

RF = Replication filter stored procedure

S = System table

SN = Synonym

SQ = Service queue

TA = Assembly (CLR) DML trigger

TF = Table function

TR = SQL DML Trigger

TT = Table type

U = User table

V = View

X = Extended stored procedure
userstat smallint [!INCLUDEssInternalOnly]
sysstat smallint [!INCLUDEssInternalOnly]
indexdel smallint [!INCLUDEssInternalOnly]
refdate datetime [!INCLUDEssInternalOnly]
version int [!INCLUDEssInternalOnly]
deltrig int [!INCLUDEssInternalOnly]
instrig int [!INCLUDEssInternalOnly]
updtrig int [!INCLUDEssInternalOnly]
seltrig int [!INCLUDEssInternalOnly]
category int Used for publication, constraints, and identity.
cache smallint [!INCLUDEssInternalOnly]

See Also

Mapping System Tables to System Views (Transact-SQL)
Compatibility Views (Transact-SQL)