属性名称
对象类型
说明和返回的值
CnstIsClustKey
|
约束
|
具有聚集索引的 PRIMARY KEY 约束。
1 = True
0 = False
|
CnstIsColumn
|
约束
|
单个列上的 CHECK、DEFAULT 或 FOREIGN KEY 约束。
1 = True
0 = False
|
CnstIsDeleteCascade
|
约束
|
具有 ON DELETE CASCADE 选项的 FOREIGN KEY 约束。
1 = True
0 = False
|
CnstIsDisabled
|
约束
|
禁用的约束。
1 = True
0 = False
|
CnstIsNonclustKey
|
约束
|
非聚集索引的 PRIMARY KEY 或 UNIQUE 约束。
1 = True
0 = False
|
CnstIsNotRepl
|
约束
|
使用 NOT FOR REPLICATION 关键字定义的约束。
1 = True
0 = False
|
CnstIsNotTrusted
|
约束
|
启用约束时未检查现有行,因此可能不是所有行都适用该约束。
1 = True
0 = False
|
CnstIsUpdateCascade
|
约束
|
具有 ON UPDATE CASCADE 选项的 FOREIGN KEY 约束。
1 = True
0 = False
|
ExecIsAfterTrigger
|
触发器
|
AFTER 触发器。
1 = True
0 = False
|
ExecIsAnsiNullsOn
|
Transact-SQL 函数、Transact-SQL 过程、Transact-SQL 触发器、视图
|
创建时的 ANSI_NULLS 设置。
1 = True
0 = False
|
ExecIsDeleteTrigger
|
触发器
|
DELETE 触发器。
1 = True
0 = False
|
ExecIsFirstDeleteTrigger
|
触发器
|
对表执行 DELETE 时触发的第一个触发器。
1 = True
0 = False
|
ExecIsFirstInsertTrigger
|
触发器
|
对表执行 INSERT 时触发的第一个触发器。
1 = True
0 = False
|
ExecIsFirstUpdateTrigger
|
触发器
|
对表执行 UPDATE 时触发的第一个触发器。
1 = True
0 = False
|
ExecIsInsertTrigger
|
触发器
|
INSERT 触发器。
1 = True
0 = False
|
ExecIsInsteadOfTrigger
|
触发器
|
INSTEAD OF 触发器。
1 = True
0 = False
|
ExecIsLastDeleteTrigger
|
触发器
|
对表执行 DELETE 时激发的最后一个触发器。
1 = True
0 = False
|
ExecIsLastInsertTrigger
|
触发器
|
对表执行 INSERT 时激发的最后一个触发器。
1 = True
0 = False
|
ExecIsLastUpdateTrigger
|
触发器
|
对表执行 UPDATE 时激发的最后一个触发器。
1 = True
0 = False
|
ExecIsQuotedIdentOn
|
Transact-SQL 函数、Transact-SQL 过程、Transact-SQL 触发器、视图
|
创建时的 QUOTED_IDENTIFIER 设置。
1 = True
0 = False
|
ExecIsStartup
|
过程
|
启动过程。
1 = True
0 = False
|
ExecIsTriggerDisabled
|
触发器
|
禁用的触发器。
1 = True
0 = False
|
ExecIsTriggerNotForRepl
|
触发器
|
定义为 NOT FOR REPLICATION 的触发器。
1 = True
0 = False
|
ExecIsUpdateTrigger
|
触发器
|
UPDATE 触发器。
1 = True
0 = False
|
HasAfterTrigger
|
表、视图
|
表或视图具有 AFTER 触发器。
1 = True
0 = False
|
HasDeleteTrigger
|
表、视图
|
表或视图具有 DELETE 触发器。
1 = True
0 = False
|
HasInsertTrigger
|
表、视图
|
表或视图具有 INSERT 触发器。
1 = True
0 = False
|
HasInsteadOfTrigger
|
表、视图
|
表或视图具有 INSTEAD OF 触发器。
1 = True
0 = False
|
HasUpdateTrigger
|
表、视图
|
表或视图具有 UPDATE 触发器。
1 = True
0 = False
|
IsAnsiNullsOn
|
Transact-SQL 函数、Transact-SQL 过程、表、Transact-SQL 触发器、视图
|
指定表的 ANSI NULLS 选项设置为 ON。这表示所有对空值的比较都取值为 UNKNOWN。只要表存在,此设置将应用于表定义中的所有表达式,包括计算列和约束。
1 = True
0 = False
|
IsCheckCnst
|
架构范围内的任何对象
|
CHECK 约束。
1 = True
0 = False
|
IsConstraint
|
架构范围内的任何对象
|
列或表的单列 CHECK、DEFAULT 或 FOREIGN KEY 约束。
1 = True
0 = False
|
IsDefault
|
架构范围内的任何对象
|
绑定的默认值。
1 = True
0 = False
|
IsDefaultCnst
|
架构范围内的任何对象
|
DEFAULT 约束。
1 = True
0 = False
|
IsDeterministic
|
函数、视图
|
函数或视图的确定性属性。
1 = 确定
0 = 不确定
|
IsEncrypted
|
Transact-SQL 函数、Transact-SQL 过程、表、Transact-SQL 触发器和视图
|
指示模块语句的原始文本已转换为模糊格式。模糊代码的输出在 SQL Server 2005 的任何目录视图中都不能直接显示。对系统表或数据库文件没有访问权限的用户不能检索模糊文本。但是,能够通过 DAC 端口访问系统表的用户或能够直接访问数据库文件的用户可以检索此文本。此外,能够向服务器进程附加调试器的用户可在运行时从内存中检索原始过程。
1 = 已加密
0 = 未加密
基本数据类型:int
|
IsExecuted
|
架构范围内的任何对象
|
可执行对象(视图、过程、函数或触发器)。
1 = True
0 = False
|
IsExtendedProc
|
架构范围内的任何对象
|
扩展过程。
1 = True
0 = False
|
IsForeignKey
|
架构范围内的任何对象
|
FOREIGN KEY 约束。
1 = True
0 = False
|
IsIndexed
|
表、视图
|
包含索引的表或视图。
1 = True
0 = False
|
IsIndexable
|
表、视图
|
可以创建索引的表或视图。
1 = True
0 = False
|
IsInlineFunction
|
函数
|
内联函数。
1 = 内联函数
0 = 非内联函数
|
IsMSShipped
|
架构范围内的任何对象
|
安装 SQL Server 过程中创建的对象。
1 = True
0 = False
|
IsPrimaryKey
|
架构范围内的任何对象
|
PRIMARY KEY 约束。
1 = True
0 = False
NULL = 非函数,或对象 ID 无效。
|
IsProcedure
|
架构范围内的任何对象
|
过程。
1 = True
0 = False
|
IsQuotedIdentOn
|
Transact-SQL 函数、Transact-SQL 过程、表、Transact-SQL 触发器、视图、CHECK 约束、DEFAULT 定义
|
指定对象的引号标识符设置为 ON。这表示用英文双引号分隔对象定义中涉及的所有表达式中的标识符。
1 = ON
0 = OFF
|
IsQueue
|
架构范围内的任何对象
|
Service Broker 队列
1 = True
0 = False
|
IsReplProc
|
架构范围内的任何对象
|
复制过程。
1 = True
0 = False
|
IsRule
|
架构范围内的任何对象
|
绑定规则。
1 = True
0 = False
|
IsScalarFunction
|
函数
|
标量值函数。
1 = 标量值函数
0 = 非标量值函数
|
IsSchemaBound
|
函数、视图
|
使用 SCHEMABINDING 创建的绑定到架构的函数或视图。
1 = 绑定到架构
0 = 不绑定架构。
|
IsSystemTable
|
表
|
系统表。
1 = True
0 = False
|
IsTable
|
表
|
表。
1 = True
0 = False
|
IsTableFunction
|
函数
|
表值函数。
1 = 表值函数
0 = 非表值函数
|
IsTrigger
|
架构范围内的任何对象
|
触发器。
1 = True
0 = False
|
IsUniqueCnst
|
架构范围内的任何对象
|
UNIQUE 约束。
1 = True
0 = False
|
IsUserTable
|
表
|
用户定义的表。
1 = True
0 = False
|
IsView
|
视图
|
视图。
1 = True
0 = False
|
OwnerId
|
架构范围内的任何对象
|
对象的所有者。
注意:
架构所有者不一定是对象所有者。例如,子对象(其 parent_object_id 为非空值)将始终返回与父对象相同的所有者 ID。
|
Nonnull = 对象所有者的数据库用户 ID。
|
TableDeleteTrigger
|
表
|
表具有 DELETE 触发器。
>1 = 指定类型的第一个触发器的 ID。
|
TableDeleteTriggerCount
|
表
|
表具有指定数目的 DELETE 触发器。
>0 = DELETE 触发器数目。
|
TableFullTextMergeStatus
|
表
|
表所具有的全文索引当前是否正在合并。
0 = 表没有全文索引,或者全文索引未在合并。
1 = 全文索引正在合并。
|
TableFullTextBackgroundUpdateIndexOn
|
表
|
表已启用全文后台更新索引(自动更改跟踪)。
1 = TRUE
0 = FALSE
|
TableFulltextCatalogId
|
表
|
表的全文索引数据所在的全文目录的 ID。
非零 = 全文目录 ID,它与全文索引表中标识行的唯一索引相关。
0 = 表没有全文索引。
|
TableFulltextChangeTrackingOn
|
表
|
表已启用全文更改跟踪。
1 = TRUE
0 = FALSE
|
TableFulltextDocsProcessed
|
表
|
自开始全文索引以来所处理的行数。在为进行全文搜索而正在编制索引的表中,将一个行的所有列视为要编制索引的文档的一部分。
0 = 没有完成的活动爬网或全文索引。
> 0 = 以下选项之一:
- 自从开始完整、增量或手动更改跟踪填充以来,由插入或更新操作处理的文档数。
- 自从执行以下操作以来由插入或更新操作处理的行数:启用具有后台更新索引填充功能的更改跟踪、更改全文索引架构、重建全文目录或重新启动 SQL Server 的实例等。
NULL = 表没有全文索引。
注意:
此属性不监视已删除行,也不对已删除行进行计数。
|
|
TableFulltextFailCount
|
表
|
全文搜索未编制索引的行数。
0 = 填充已完成。
> 0 = 以下选项之一:
- 自从开始完整、增量和手动更新更改跟踪填充以来未编制索引的文档数。
- 对于具有后台更新索引功能的更改跟踪,则为自从开始填充或重新启动填充以来未编制索引的行数。这可能由架构更改、目录重建、服务器重新启动等引起。
NULL = 表没有全文索引。
|
TableFulltextItemCount
|
表
|
成功编制了全文索引的行数。
|
TableFulltextKeyColumn
|
表
|
与参与全文索引定义的单列唯一索引关联的列的 ID。
0 = 表没有全文索引。
|
TableFulltextPendingChanges
|
表
|
要处理的挂起更改跟踪项的数目。
0 = 未启用更改跟踪。
NULL = 表没有全文索引。
|
TableFulltextPopulateStatus
|
表
|
0 = 空闲。
1 = 正在进行完全填充。
2 = 正在进行增量填充。
3 = 正在传播所跟踪的更改。
4 = 正在进行后台更新索引(例如,自动跟踪更改)。
5 = 全文索引已中止或暂停。
|
TableHasActiveFulltextIndex
|
表
|
表具有活动的全文索引。
1 = True
0 = False
|
TableHasCheckCnst
|
表
|
表具有 CHECK 约束。
1 = True
0 = False
|
TableHasClustIndex
|
表
|
表具有聚集索引。
1 = True
0 = False
|
TableHasDefaultCnst
|
表
|
表具有 DEFAULT 约束。
1 = True
0 = False
|
TableHasDeleteTrigger
|
表
|
表具有 DELETE 触发器。
1 = True
0 = False
|
TableHasForeignKey
|
表
|
表具有 FOREIGN KEY 约束。
1 = True
0 = False
|
TableHasForeignRef
|
表
|
表由 FOREIGN KEY 约束引用。
1 = True
0 = False
|
TableHasIdentity
|
表
|
表具有标识列。
1 = True
0 = False
|
TableHasIndex
|
表
|
表具有任意类型的索引。
1 = True
0 = False
|
TableHasInsertTrigger
|
表
|
对象具有 INSERT 触发器。
1 = True
0 = False
|
TableHasNonclustIndex
|
表
|
表有非聚集索引。
1 = True
0 = False
|
TableHasPrimaryKey
|
表
|
表具有主键。
1 = True
0 = False
|
TableHasRowGuidCol
|
表
|
表的 uniqueidentifier 列具有 ROWGUIDCOL。
1 = True
0 = False
|
TableHasTextImage
|
表
|
表具有 text、ntext 或 image 列。
1 = True
0 = False
|
TableHasTimestamp
|
表
|
表具有 timestamp 列。
1 = True
0 = False
|
TableHasUniqueCnst
|
表
|
表具有 UNIQUE 约束。
1 = True
0 = False
|
TableHasUpdateTrigger
|
表
|
对象有 UPDATE 触发器。
1 = True
0 = False
|
TableHasVarDecimalStorageFormat
|
表
|
为 vardecimal 存储格式启用表。
1 = True
0 = False
|
TableInsertTrigger
|
表
|
表具有 INSERT 触发器。
>1 = 指定类型的第一个触发器的 ID。
|
TableInsertTriggerCount
|
表
|
表有指定数目的 INSERT 触发器。
>0 = INSERT 触发器的个数。
|
TableIsFake
|
表
|
表不是真实的表。它将由 SQL Server 数据库引擎根据需要在内部进行具体化。
1 = True
0 = False
|
TableIsLockedOnBulkLoad
|
表
|
bcp 或 BULK INSERT 作业导致表被锁。
1 = True
0 = False
|
TableIsPinned
|
表
|
驻留表以将其保留在数据缓存中。
0 = False
SQL Server 2005 及更高版本不支持此功能。
|
TableTextInRowLimit
|
表
|
text in row 允许的最大字节数。
如果未设置 text in row 选项,则返回 0。
|
TableUpdateTrigger
|
表
|
表具有 UPDATE 触发器。
>1 = 指定类型的第一个触发器的 ID。
|
TableUpdateTriggerCount
|
表
|
表有指定数目的 UPDATE 触发器。
> 0 = UPDATE 触发器的个数。
|
TableHasColumnSet
|
表
|
表具有列集。
0 = False
1 = True
有关详细信息,请参阅使用列集。
|
相关推荐
可以使用MS SQL Server的系统存储过程sp_rename与OBJECTPROPERTY来更改重命名。实例一,更改表名: 代码如下: IF EXISTS(SELECT TOP 1 1 FROM dbo.sysobjects WHERE id = object_id(N'[dbo].[Employee]’) AND ...
ObjectProperty Java code Example
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[readertype]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) drop table [dbo].[readertype] GO if exists (select * from dbo....
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Actor]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) drop table [dbo].[Actor] GO if exists (select * from dbo.sysobjects ...
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[card]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) drop table [dbo].[card] GO if exists (select * from dbo.sysobjects where id =...
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbUser]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) drop table [dbo].[tbUser] GO if exists (select * from dbo.sysobjects where ...
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[JHCRM_Report_ss]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) drop table [JHCRM_Report_ss] //添加表 if not exists (select * ...
下面为您介绍sql下用了判断各种资源是否存在的代码,需要的朋友可以参考下,希望对您学习sql的...if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[表名]') and OBJECTPROPERTY(id, N'IsUserTab
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[FK_Borrow_Info_Book_Info]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1) ALTER TABLE [dbo].[Borrow_Info] DROP CONSTRAINT FK_Borrow...
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[kucun_setup]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) drop procedure [dbo].[kucun_setup] GO if exists (select * from dbo....
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[user_Info]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) drop table [dbo].[user_Info] GO if exists (select * from dbo.sysobjects ...
if exists (select * from dbo.sysobjects where id = object_id(N [dbo].[StuInfo] ) and OBJECTPROPERTY(id, N IsUserTable ) = 1) drop table [dbo].[StuInfo] GO CREATE TABLE [dbo].[StuInfo] ( [StuID] ...
vc实现通过树访问数据库,剩下的为凑够20字,数据库表为if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[TreeItem]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) drop table [dbo]....
下面学习下二者的用法。 a,判断数据库不存在时 代码如下:if not exists(select * from sys.databases where name = ‘database_name’) b,判断表不存在时 代码如下:if not exists (select * from sysobjects ...
1.请在sql server 中建一数据库 name:house 在house中运行下列脚本 if exists (select * from sysobjects where id = object_id(N´[dbo].[City]´) and OBJECTPROPERTY(id, N´IsUserTable´) = ...
按照richfaceslivedemo中的例子 改成节点存储在数据库中 把数据库生成好 添加数据 就可以用了 数据库脚本:if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[node]') and OBJECTPROPERTY(id,...
使用MSSQL2000,下面是表的脚本 if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Student]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) drop table [dbo].[Student] GO <br>...
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[d_mtrd]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) drop table [dbo].[d_mtrd] GO if exists (select * from dbo.sysobjects where ...
去掉xp_cmdshell扩展过程的方法是使用如下语句: if exists (select * from dbo.sysobjects where id=object_id(N'[dbo].[xpcmdshell]’) and OBJECTPROPERTY(id,N’IsExtendedProc’)=1)exec sp_...