OBJECTPROPERTY (Transact-SQL)OBJECTPROPERTY (Transact-SQL)
適用対象:Applies to: SQL ServerSQL Server (サポートされているすべてのバージョン)
SQL ServerSQL Server (all supported versions)
Azure SQL データベースAzure SQL Database
Azure SQL データベースAzure SQL Database
Azure SQL Managed InstanceAzure SQL Managed Instance
Azure SQL Managed InstanceAzure SQL Managed Instance
Azure Synapse AnalyticsAzure Synapse Analytics
Azure Synapse AnalyticsAzure Synapse Analytics
Parallel Data WarehouseParallel Data Warehouse
Parallel Data WarehouseParallel Data Warehouse
SQL ServerSQL Server (サポートされているすべてのバージョン)
SQL ServerSQL Server (all supported versions)
Azure SQL データベースAzure SQL Database
Azure SQL データベースAzure SQL Database
Azure SQL Managed InstanceAzure SQL Managed Instance
Azure SQL Managed InstanceAzure SQL Managed Instance
Azure Synapse AnalyticsAzure Synapse Analytics
Azure Synapse AnalyticsAzure Synapse Analytics
Parallel Data WarehouseParallel Data Warehouse
Parallel Data WarehouseParallel Data Warehouse
現在のデータベース内のスキーマ スコープ オブジェクトに関する情報を返します。Returns information about schema-scoped objects in the current database. スキーマ スコープ オブジェクトの一覧については、「sys.objects (Transact-SQL)」をご覧ください。For a list of schema-scoped objects, see sys.objects (Transact-SQL). データ定義言語 (DDL) トリガーやイベント通知など、スキーマ スコープ オブジェクト以外のオブジェクトについては、この関数を使用できません。This function cannot be used for objects that are not schema-scoped, such as data definition language (DDL) triggers and event notifications.
Transact-SQL 構文表記規則
Transact-SQL Syntax Conventions
構文Syntax
OBJECTPROPERTY ( id , property )
注意
SQL Server 2014 以前の Transact-SQL 構文を確認するには、以前のバージョンのドキュメントを参照してください。To view Transact-SQL syntax for SQL Server 2014 and earlier, see Previous versions documentation.
引数Arguments
idid
現在のデータベース内のオブジェクトの ID を表す式を指定します。Is an expression that represents the ID of the object in the current database. id のデータ型は int で、現在のデータベース コンテキストでのスキーマ スコープ オブジェクトであることが前提となっています。id is int and is assumed to be a schema-scoped object in the current database context.
propertyproperty
id で指定されるオブジェクトに対して返される情報を表す式です。property は次のいずれかを指定することができます。Is an expression that represents the information to be returned for the object specified by id. property can be one of the following values.
注意
property が有効なプロパティ名でない場合、id が有効なオブジェクト ID でない場合、id が指定した property でサポートされていないオブジェクトの種類であった場合、または呼び出し側にオブジェクトのメタデータを表示する権限がない場合は、特に指定のない限り、NULL が返されます。Unless noted otherwise, NULL is returned when property is not a valid property name, id is not a valid object ID, id is an unsupported object type for the specified property, or the caller does not have permission to view the object's metadata.
プロパティ名Property name | オブジェクトの種類Object type | 説明と戻り値Description and values returned |
---|---|---|
CnstIsClustKeyCnstIsClustKey | 制約Constraint | クラスター化インデックスを指定した PRIMARY KEY 制約。PRIMARY KEY constraint with a clustered index. 1 = True1 = True 0 = False0 = False |
CnstIsColumnCnstIsColumn | 制約Constraint | 単一列に対する CHECK、DEFAULT、または FOREIGN KEY 制約。CHECK, DEFAULT, or FOREIGN KEY constraint on a single column. 1 = True1 = True 0 = False0 = False |
CnstIsDeleteCascadeCnstIsDeleteCascade | 制約Constraint | ON DELETE CASCADE オプションを指定した FOREIGN KEY 制約。FOREIGN KEY constraint with the ON DELETE CASCADE option. 1 = True1 = True 0 = False0 = False |
CnstIsDisabledCnstIsDisabled | 制約Constraint | 制約の無効化。Disabled constraint. 1 = True1 = True 0 = False0 = False |
CnstIsNonclustKeyCnstIsNonclustKey | 制約Constraint | 非クラスター化インデックスを持つ PRIMARY KEY 制約または UNIQUE 制約。PRIMARY KEY or UNIQUE constraint with a nonclustered index. 1 = True1 = True 0 = False0 = False |
CnstIsNotReplCnstIsNotRepl | 制約Constraint | 制約を NOT FOR REPLICATION キーワードを使って定義。Constraint is defined by using the NOT FOR REPLICATION keywords. 1 = True1 = True 0 = False0 = False |
CnstIsNotTrustedCnstIsNotTrusted | 制約Constraint | 既存の行を確認せずに制約が有効化されているので、制約がすべての行に対応しているとは限りません。Constraint was enabled without checking existing rows; therefore, the constraint may not hold for all rows. 1 = True1 = True 0 = False0 = False |
CnstIsUpdateCascadeCnstIsUpdateCascade | 制約Constraint | ON UPDATE CASCADE オプションを指定した FOREIGN KEY 制約。FOREIGN KEY constraint with the ON UPDATE CASCADE option. 1 = True1 = True 0 = False0 = False |
ExecIsAfterTriggerExecIsAfterTrigger | トリガーTrigger | AFTER トリガー。AFTER trigger. 1 = True1 = True 0 = False0 = False |
ExecIsAnsiNullsOnExecIsAnsiNullsOn | Transact-SQLTransact-SQL 関数、Transact-SQLTransact-SQL プロシージャ、Transact-SQLTransact-SQL トリガー、ビューfunction, Transact-SQLTransact-SQL procedure, Transact-SQLTransact-SQL trigger, view | 作成時における ANSI_NULLS の設定。Setting of ANSI_NULLS at creation time. 1 = True1 = True 0 = False0 = False |
ExecIsDeleteTriggerExecIsDeleteTrigger | トリガーTrigger | DELETE トリガー。DELETE trigger. 1 = True1 = True 0 = False0 = False |
ExecIsFirstDeleteTriggerExecIsFirstDeleteTrigger | トリガーTrigger | テーブルに対して DELETE を実行するときに最初に起動されるトリガー。First trigger fired when a DELETE is executed against the table. 1 = True1 = True 0 = False0 = False |
ExecIsFirstInsertTriggerExecIsFirstInsertTrigger | トリガーTrigger | テーブルに対して INSERT を実行するときに最初に起動されるトリガー。First trigger fired when an INSERT is executed against the table. 1 = True1 = True 0 = False0 = False |
ExecIsFirstUpdateTriggerExecIsFirstUpdateTrigger | トリガーTrigger | テーブルに対して UPDATE を実行するときに最初に起動されるトリガー。First trigger fired when an UPDATE is executed against the table. 1 = True1 = True 0 = False0 = False |
ExecIsInsertTriggerExecIsInsertTrigger | トリガーTrigger | INSERT トリガー。INSERT trigger. 1 = True1 = True 0 = False0 = False |
ExecIsInsteadOfTriggerExecIsInsteadOfTrigger | トリガーTrigger | INSTEAD OF トリガー。INSTEAD OF trigger. 1 = True1 = True 0 = False0 = False |
ExecIsLastDeleteTriggerExecIsLastDeleteTrigger | トリガーTrigger | テーブルに対して DELETE を実行するときに最後に起動されるトリガー。Last trigger fired when a DELETE is executed against the table. 1 = True1 = True 0 = False0 = False |
ExecIsLastInsertTriggerExecIsLastInsertTrigger | トリガーTrigger | テーブルに対して INSERT を実行するときに最後に起動されるトリガー。Last trigger fired when an INSERT is executed against the table. 1 = True1 = True 0 = False0 = False |
ExecIsLastUpdateTriggerExecIsLastUpdateTrigger | トリガーTrigger | テーブルに対して UPDATE を実行するときに最後に起動されるトリガー。Last trigger fired when an UPDATE is executed against the table. 1 = True1 = True 0 = False0 = False |
ExecIsQuotedIdentOnExecIsQuotedIdentOn | Transact-SQLTransact-SQL 関数、Transact-SQLTransact-SQL プロシージャ、Transact-SQLTransact-SQL トリガー、ビューfunction, Transact-SQLTransact-SQL procedure, Transact-SQLTransact-SQL trigger, view | 作成時における QUOTED_IDENTIFIER の設定。Setting of QUOTED_IDENTIFIER at creation time. 1 = True1 = True 0 = False0 = False |
ExecIsStartupExecIsStartup | 手順Procedure | スタートアップ プロシージャ。Startup procedure. 1 = True1 = True 0 = False0 = False |
ExecIsTriggerDisabledExecIsTriggerDisabled | トリガーTrigger | トリガーの無効化。Disabled trigger. 1 = True1 = True 0 = False0 = False |
ExecIsTriggerNotForReplExecIsTriggerNotForRepl | トリガーTrigger | NOT FOR REPLICATION として定義されているトリガー。Trigger defined as NOT FOR REPLICATION. 1 = True1 = True 0 = False0 = False |
ExecIsUpdateTriggerExecIsUpdateTrigger | トリガーTrigger | UPDATE トリガー。UPDATE trigger. 1 = True1 = True 0 = False0 = False |
ExecIsWithNativeCompilationExecIsWithNativeCompilation | Transact-SQLTransact-SQL プロシージャProcedure | 適用対象: SQL Server 2014 (12.x)SQL Server 2014 (12.x) 以降。Applies to: SQL Server 2014 (12.x)SQL Server 2014 (12.x) and later. プロシージャはネイティブでコンパイルされます。Procedure is natively compiled. 1 = True1 = True 0 = False0 = False 基本データ型: intBase data type: int |
HasAfterTriggerHasAfterTrigger | テーブル、ビューTable, view | テーブルまたはビューに AFTER トリガーがあります。Table or view has an AFTER trigger. 1 = True1 = True 0 = False0 = False |
HasDeleteTriggerHasDeleteTrigger | テーブル、ビューTable, view | テーブルまたはビューに DELETE トリガーがあります。Table or view has a DELETE trigger. 1 = True1 = True 0 = False0 = False |
HasInsertTriggerHasInsertTrigger | テーブル、ビューTable, view | テーブルまたはビューに INSERT トリガーがあります。Table or view has an INSERT trigger. 1 = True1 = True 0 = False0 = False |
HasInsteadOfTriggerHasInsteadOfTrigger | テーブル、ビューTable, view | テーブルまたはビューに INSTEAD OF トリガーがあります。Table or view has an INSTEAD OF trigger. 1 = True1 = True 0 = False0 = False |
HasUpdateTriggerHasUpdateTrigger | テーブル、ビューTable, view | テーブルまたはビューに UPDATE トリガーがあります。Table or view has an UPDATE trigger. 1 = True1 = True 0 = False0 = False |
IsAnsiNullsOnIsAnsiNullsOn | Transact-SQLTransact-SQL 関数、Transact-SQLTransact-SQL プロシージャ、テーブル、Transact-SQLTransact-SQL トリガー、ビューfunction, Transact-SQLTransact-SQL procedure, table, Transact-SQLTransact-SQL trigger, view | テーブルの ANSI NULLS オプションが ON であることをことを指定します。Specifies that the ANSI NULLS option setting for the table is ON. つまり、NULL 値との比較結果はすべて UNKNOWN になります。This means all comparisons against a null value evaluate to UNKNOWN. この設定は、テーブルが存在する限り、計算列や制約をはじめとするテーブル定義内のすべての式に適用されます。This setting applies to all expressions in the table definition, including computed columns and constraints, for as long as the table exists. 1 = True1 = True 0 = False0 = False |
IsCheckCnstIsCheckCnst | 任意のスキーマ スコープ オブジェクトAny schema-scoped object | CHECK 制約。CHECK constraint. 1 = True1 = True 0 = False0 = False |
IsConstraintIsConstraint | 任意のスキーマ スコープ オブジェクトAny schema-scoped object | 列またはテーブルに対する単一列の CHECK、DEFAULT、または FOREIGN KEY 制約です。Is a single column CHECK, DEFAULT, or FOREIGN KEY constraint on a column or table. 1 = True1 = True 0 = False0 = False |
IsDefaultIsDefault | 任意のスキーマ スコープ オブジェクトAny schema-scoped object | 適用対象: SQL Server 2008SQL Server 2008 以降。Applies to: SQL Server 2008SQL Server 2008 and later. 既定のバインド。Bound default. 1 = True1 = True 0 = False0 = False |
IsDefaultCnstIsDefaultCnst | 任意のスキーマ スコープ オブジェクトAny schema-scoped object | DEFAULT 制約。DEFAULT constraint. 1 = True1 = True 0 = False0 = False |
IsDeterministicIsDeterministic | 関数、ビューFunction, view | 関数またはビューの決定性を示すプロパティ。The determinism property of the function or view. 1 = 決定的1 = Deterministic 0 = 非決定的0 = Not Deterministic |
IsEncryptedIsEncrypted | Transact-SQLTransact-SQL 関数、Transact-SQLTransact-SQL プロシージャ、テーブル、Transact-SQLTransact-SQL トリガー、ビューfunction, Transact-SQLTransact-SQL procedure, table, Transact-SQLTransact-SQL trigger, view | モジュール ステートメントの元のテキストが、暗号化した形式に変換されたことを示します。Indicates that the original text of the module statement was converted to an obfuscated format. 暗号化した形式の出力は、SQL Server 2005 (9.x)SQL Server 2005 (9.x) 内のどのカタログ ビューでも直接見ることはできません。The output of the obfuscation is not directly visible in any of the catalog views in SQL Server 2005 (9.x)SQL Server 2005 (9.x). システム テーブルまたはデータベース ファイルへのアクセス権を持たないユーザーは、暗号化した形式のテキストを取得できません。Users without access to system tables or database files cannot retrieve the obfuscated text. ただし、DAC ポート経由でシステム テーブルにアクセスする権限、または直接データベース ファイルにアクセスする権限を持っているユーザーは、このテキストを使用できます。However, the text is available to users that can either access system tables over the DAC port or directly access database files. また、サーバー プロセスにデバッガーをアタッチできるユーザーは、実行時、元のプロシージャをメモリから取得できます。Also, users that can attach a debugger to the server process can retrieve the original procedure from memory at run time. 1 = 暗号化1 = Encrypted 0 = 暗号化なし0 = Not encrypted 基本データ型: intBase data type: int |
IsExecutedIsExecuted | 任意のスキーマ スコープ オブジェクトAny schema-scoped object | オブジェクトが実行可能かどうかを示します (ビュー、プロシージャ、関数、またはトリガー)。Object can be executed (view, procedure, function, or trigger). 1 = True1 = True 0 = False0 = False |
IsExtendedProcIsExtendedProc | 任意のスキーマ スコープ オブジェクトAny schema-scoped object | 拡張プロシージャ。Extended procedure. 1 = True1 = True 0 = False0 = False |
IsForeignKeyIsForeignKey | 任意のスキーマ スコープ オブジェクトAny schema-scoped object | FOREIGN KEY 制約。FOREIGN KEY constraint. 1 = True1 = True 0 = False0 = False |
IsIndexedIsIndexed | テーブル、ビューTable, view | インデックス付きのテーブルまたはビュー。Table or view that has an index. 1 = True1 = True 0 = False0 = False |
IsIndexableIsIndexable | テーブル、ビューTable, view | インデックスを作成できるテーブルまたはビュー。Table or view on which an index can be created. 1 = True1 = True 0 = False0 = False |
IsInlineFunctionIsInlineFunction | 機能Function | インライン関数。Inline function. 1 = インライン関数1 = Inline function 0 = インライン関数ではない0 = Not inline function |
IsMSShippedIsMSShipped | 任意のスキーマ スコープ オブジェクトAny schema-scoped object | SQL ServerSQL Server のインストール時に作成されたオブジェクト。Object created during installation of SQL ServerSQL Server. 1 = True1 = True 0 = False0 = False |
IsPrimaryKeyIsPrimaryKey | 任意のスキーマ スコープ オブジェクトAny schema-scoped object | PRIMARY KEY 制約。PRIMARY KEY constraint. 1 = True1 = True 0 = False0 = False NULL = 関数ではありません。またはオブジェクト ID が無効です。NULL = Not a function, or object ID is not valid. |
IsProcedureIsProcedure | 任意のスキーマ スコープ オブジェクトAny schema-scoped object | プロシージャ。Procedure. 1 = True1 = True 0 = False0 = False |
IsQuotedIdentOnIsQuotedIdentOn | Transact-SQLTransact-SQL 関数、Transact-SQLTransact-SQL プロシージャ、テーブル、Transact-SQLTransact-SQL トリガー、ビュー、CHECK 制約、DEFAULT 定義function, Transact-SQLTransact-SQL procedure, table, Transact-SQLTransact-SQL trigger, view, CHECK constraint, DEFAULT definition | オブジェクトの引用符で囲まれた識別子の設定が ON であることを指定します。Specifies that the quoted identifier setting for the object is ON. オブジェクト定義に含まれるすべての式の中で、識別子は二重引用符で区切られます。This means double quotation marks delimit identifiers in all expressions involved in the object definition. 1 = ON1 = ON 0 = OFF0 = OFF |
IsQueueIsQueue | 任意のスキーマ スコープ オブジェクトAny schema-scoped object | Service Broker キューService Broker Queue 1 = True1 = True 0 = False0 = False |
IsReplProcIsReplProc | 任意のスキーマ スコープ オブジェクトAny schema-scoped object | レプリケーション プロシージャ。Replication procedure. 1 = True1 = True 0 = False0 = False |
IsRuleIsRule | 任意のスキーマ スコープ オブジェクトAny schema-scoped object | ルールのバインド。Bound rule. 1 = True1 = True 0 = False0 = False |
IsScalarFunctionIsScalarFunction | 機能Function | スカラー値関数。Scalar-valued function. 1 = スカラー値関数1 = Scalar-valued function 0 = スカラー値関数ではない0 = Not scalar-valued function |
IsSchemaBoundIsSchemaBound | 関数、ビューFunction, view | SCHEMABINDING を使用して作成されたスキーマ バインド関数またはビュー。A schema bound function or view created by using SCHEMABINDING. 1 = スキーマ バインド1 = Schema-bound 0 = 非スキーマ バインド0 = Not schema-bound. |
IsSystemTableIsSystemTable | テーブルTable | システム テーブル。System table. 1 = True1 = True 0 = False0 = False |
IsSystemVerifiedIsSystemVerified | ObjectObject | SQL Server では、オブジェクトの決定性のプロパティと有効桁数のプロパティを確認できます。SQL Server can verify the determinism and precision properties of the object. 1 = True1 = True 0 = False0 = False |
IsTableIsTable | テーブルTable | テーブル。Table. 1 = True1 = True 0 = False0 = False |
IsTableFunctionIsTableFunction | 機能Function | テーブル値関数。Table-valued function. 1 = テーブル値関数1 = Table-valued function 0 = テーブル値関数ではない0 = Not table-valued function |
IsTriggerIsTrigger | 任意のスキーマ スコープ オブジェクトAny schema-scoped object | トリガー。Trigger. 1 = True1 = True 0 = False0 = False |
IsUniqueCnstIsUniqueCnst | 任意のスキーマ スコープ オブジェクトAny schema-scoped object | UNIQUE 制約。UNIQUE constraint. 1 = True1 = True 0 = False0 = False |
IsUserTableIsUserTable | テーブルTable | ユーザー定義テーブル。User-defined table. 1 = True1 = True 0 = False0 = False |
IsViewIsView | ViewView | ビュー。View. 1 = True1 = True 0 = False0 = False |
OwnerIdOwnerId | 任意のスキーマ スコープ オブジェクトAny schema-scoped object | オブジェクトの所有者。Owner of the object. 注: スキーマ所有者はオブジェクト所有者である必要はありません。Note: The schema owner is not necessarily the object owner. たとえば、子オブジェクト (parent_object_id が NULL でないオブジェクト) では、常に親オブジェクトと同じ所有者 ID が返されます。For example, child objects (those where parent_object_id is nonnull) will always return the same owner ID as the parent. NULL 以外 = オブジェクト所有者のデータベース ユーザー ID です。Nonnull = The database user ID of the object owner. |
SchemaIdSchemaId | 任意のスキーマ スコープ オブジェクトAny schema-scoped object | オブジェクトが所属するスキーマのスキーマ ID。Schema ID of the schema to which the object belongs. |
TableDeleteTriggerTableDeleteTrigger | テーブルTable | テーブルに DELETE トリガーがあります。Table has a DELETE trigger. >1 = 指定された種類の最初のトリガーの ID。>1 = ID of first trigger with the specified type. |
TableDeleteTriggerCountTableDeleteTriggerCount | テーブルTable | テーブルには指定された数の DELETE トリガーがあります。Table has the specified number of DELETE triggers. >0 = DELETE トリガーの数。>0 = The number of DELETE triggers. |
TableFullTextMergeStatusTableFullTextMergeStatus | テーブルTable | 適用対象: SQL Server 2008SQL Server 2008 以降。Applies to: SQL Server 2008SQL Server 2008 and later. 現在マージ中のフルテキスト インデックスがテーブルにあるかどうかを示します。Whether a table that has a full-text index that is currently in merging. 0 = テーブルにフルテキスト インデックスがないか、フルテキスト インデックスがマージ中ではない0 = Table does not have a full-text index, or the full-text index is not in merging. 1 = フルテキスト インデックスがマージ中。1 = The full-text index is in merging. |
TableFullTextBackgroundUpdateIndexOnTableFullTextBackgroundUpdateIndexOn | テーブルTable | 適用対象: SQL Server 2008SQL Server 2008 以降。Applies to: SQL Server 2008SQL Server 2008 and later. テーブルではフルテキスト インデックスのバックグラウンド更新 (変更の自動追跡) が有効です。Table has full-text background update index (autochange tracking) enabled. 1 = TRUE1 = TRUE 0 = FALSE0 = FALSE |
TableFulltextCatalogIdTableFulltextCatalogId | テーブルTable | 適用対象: SQL Server 2008SQL Server 2008 以降。Applies to: SQL Server 2008SQL Server 2008 and later. テーブルのフルテキスト インデックス データが存在する、フルテキスト カタログの ID。ID of the full-text catalog in which the full-text index data for the table resides. 0 以外 = フルテキスト インデックス テーブル内の行を識別する一意なインデックスに関連付けられた、フルテキスト カタログ ID。Nonzero = Full-text catalog ID, associated with the unique index that identifies the rows in a full-text indexed table. 0 = テーブルにフルテキスト インデックスはない。0 = Table does not have a full-text index. |
TableFulltextChangeTrackingOnTableFulltextChangeTrackingOn | テーブルTable | 適用対象: SQL Server 2008SQL Server 2008 以降。Applies to: SQL Server 2008SQL Server 2008 and later. テーブルでは、フルテキストの変更の追跡が有効になっています。Table has full-text change-tracking enabled. 1 = TRUE1 = TRUE 0 = FALSE0 = FALSE |
TableFulltextDocsProcessedTableFulltextDocsProcessed | テーブルTable | 適用対象: SQL Server 2008SQL Server 2008 以降。Applies to: SQL Server 2008SQL Server 2008 and later. フルテキスト インデックス作成の開始以降に処理された行の数。Number of rows processed since the start of full-text indexing. フルテキスト検索用にインデックスが作成されるテーブルでは、1 行のすべての列が、インデックスが作成される 1 つのドキュメントの一部と見なされます。In a table that is being indexed for full-text search, all the columns of one row are considered as part of one document to be indexed. 0 = アクティブ クロールまたはフルテキスト インデックス作成は完了していない。0 = No active crawl or full-text indexing is completed. > 0 = 次のいずれか (A または B): A) 完全、増分、または手動による変更追跡の作成開始以降、挿入操作や更新操作で処理されたドキュメントの数です。> 0 = One of the following (A or B): A) The number of documents processed by insert or update operations since the start of Full, Incremental, or Manual change tracking population. B) バックグラウンド更新インデックス作成の有効化、フルテキスト インデックス スキーマの変更、フルテキスト カタログの再構築、または SQL ServerSQL Server のインスタンスの再起動などの変更の追跡以降、挿入操作や更新操作で処理された行数。B) The number of rows processed by insert or update operations since change tracking with background update index population was enabled, the full-text index schema changed, the full-text catalog rebuilt, or the instance of SQL ServerSQL Server restarted, and so on. NULL = テーブルにフルテキスト インデックスはない。NULL = Table does not have a full-text index. このプロパティによって、削除された行の監視またはカウントは行われません。This property does not monitor or count deleted rows. |
TableFulltextFailCountTableFulltextFailCount | テーブルTable | 適用対象: SQL Server 2008SQL Server 2008 以降。Applies to: SQL Server 2008SQL Server 2008 and later. フルテキスト検索によるインデックスが設定されなかった行数。Number of rows Full-Text Search did not index. 0 = 作成完了0 = The population has completed. > 0 = 次のいずれか (A または B): A) 完全、増分、または手動更新による変更追跡の作成開始以降に、インデックスが作成されなかったドキュメントの数。> 0 = One of the following (A or B): A) The number of documents that were not indexed since the start of Full, Incremental, and Manual Update change tracking population. B) インデックスのバックグラウンド更新による変更追跡の場合、作成の開始または再開以降にインデックスが作成されなかった行数。B) For change tracking with background update index, the number of rows that were not indexed since the start of the population, or the restart of the population. これは、スキーマの変更、カタログの再構築、サーバーの再起動などにより発生する場合があります。This could be caused by a schema change, rebuild of the catalog, server restart, and so on. NULL = テーブルにフルテキスト インデックスはない。NULL = Table does not have a full-text index. |
TableFulltextItemCountTableFulltextItemCount | テーブルTable | 適用対象: SQL Server 2008SQL Server 2008 以降。Applies to: SQL Server 2008SQL Server 2008 and later. フルテキスト インデックスが正常に設定された行数。Number of rows that were successfully full-text indexed. |
TableFulltextKeyColumnTableFulltextKeyColumn | テーブルTable | 適用対象: SQL Server 2008SQL Server 2008 以降。Applies to: SQL Server 2008SQL Server 2008 and later. フルテキスト インデックス定義に関係している、一意な単一列インデックスに関連付けられた列の ID。ID of the column associated with the single-column unique index that is participating in the full-text index definition. 0 = テーブルにフルテキスト インデックスはない。0 = Table does not have a full-text index. |
TableFulltextPendingChangesTableFulltextPendingChanges | テーブルTable | 適用対象: SQL Server 2008SQL Server 2008 以降。Applies to: SQL Server 2008SQL Server 2008 and later. 変更の追跡が処理されていないエントリ数。Number of pending change tracking entries to process. 0 = 変更の追跡は有効でない0 = change tracking is not enabled. NULL = テーブルにフルテキスト インデックスはない。NULL = Table does not have a full-text index. |
TableFulltextPopulateStatusTableFulltextPopulateStatus | テーブルTable | 適用対象: SQL Server 2008SQL Server 2008 以降。Applies to: SQL Server 2008SQL Server 2008 and later. 0 = アイドル状態0 = Idle. 1 = 全体を作成中1 = Full population is in progress. 2 = 増分作成中2 = Incremental population is in progress. 3 = 追跡した変更を伝達中3 = Propagation of tracked changes is in progress. 4 = 自動変更の追跡など、インデックスのバックグラウンド更新が進行中4 = Background update index is in progress, such as autochange tracking. 5 = フルテキスト インデックス作成が絞り込みまたは停止された5 = Full-text indexing is throttled or paused. |
TableHasActiveFulltextIndexTableHasActiveFulltextIndex | テーブルTable | 適用対象: SQL Server 2008SQL Server 2008 以降。Applies to: SQL Server 2008SQL Server 2008 and later. テーブルにアクティブなフルテキスト インデックスがあります。Table has an active full-text index. 1 = True1 = True 0 = False0 = False |
TableHasCheckCnstTableHasCheckCnst | テーブルTable | テーブルに CHECK 制約があります。Table has a CHECK constraint. 1 = True1 = True 0 = False0 = False |
TableHasClustIndexTableHasClustIndex | テーブルTable | テーブルにクラスター化インデックスがあります。Table has a clustered index. 1 = True1 = True 0 = False0 = False |
TableHasDefaultCnstTableHasDefaultCnst | テーブルTable | テーブルに DEFAULT 制約があります。Table has a DEFAULT constraint. 1 = True1 = True 0 = False0 = False |
TableHasDeleteTriggerTableHasDeleteTrigger | テーブルTable | テーブルに DELETE トリガーがあります。Table has a DELETE trigger. 1 = True1 = True 0 = False0 = False |
TableHasForeignKeyTableHasForeignKey | テーブルTable | テーブルに FOREIGN KEY 制約があります。Table has a FOREIGN KEY constraint. 1 = True1 = True 0 = False0 = False |
TableHasForeignRefTableHasForeignRef | テーブルTable | テーブルは FOREIGN KEY 制約により参照されています。Table is referenced by a FOREIGN KEY constraint. 1 = True1 = True 0 = False0 = False |
TableHasIdentityTableHasIdentity | テーブルTable | テーブルに ID 列があります。Table has an identity column. 1 = True1 = True 0 = False0 = False |
TableHasIndexTableHasIndex | テーブルTable | テーブルに任意の種類のインデックスがあります。Table has an index of any type. 1 = True1 = True 0 = False0 = False |
TableHasInsertTriggerTableHasInsertTrigger | テーブルTable | オブジェクトに INSERT トリガーがあります。Object has an INSERT trigger. 1 = True1 = True 0 = False0 = False |
TableHasNonclustIndexTableHasNonclustIndex | テーブルTable | テーブルには非クラスター化インデックスがあります。Table has a nonclustered index. 1 = True1 = True 0 = False0 = False |
TableHasPrimaryKeyTableHasPrimaryKey | テーブルTable | テーブルに主キーがあります。Table has a primary key. 1 = True1 = True 0 = False0 = False |
TableHasRowGuidColTableHasRowGuidCol | テーブルTable | テーブルには、uniqueidentifier 列用の ROWGUIDCOL があります。Table has a ROWGUIDCOL for a uniqueidentifier column. 1 = True1 = True 0 = False0 = False |
TableHasTextImageTableHasTextImage | テーブルTable | テーブルには、text、ntext、または image 列があります。Table has a text, ntext, or image column. 1 = True1 = True 0 = False0 = False |
TableHasTimestampTableHasTimestamp | テーブルTable | テーブルには、timestamp 列があります。Table has a timestamp column. 1 = True1 = True 0 = False0 = False |
TableHasUniqueCnstTableHasUniqueCnst | テーブルTable | テーブルに UNIQUE 制約があります。Table has a UNIQUE constraint. 1 = True1 = True 0 = False0 = False |
TableHasUpdateTriggerTableHasUpdateTrigger | テーブルTable | オブジェクトには UPDATE トリガーがあります。Object has an UPDATE trigger. 1 = True1 = True 0 = False0 = False |
TableHasVarDecimalStorageFormatTableHasVarDecimalStorageFormat | テーブルTable | テーブルで vardecimal ストレージ形式が有効になっています。Table is enabled for vardecimal storage format. 1 = True1 = True 0 = False0 = False |
TableInsertTriggerTableInsertTrigger | テーブルTable | テーブルに INSERT トリガーがあります。Table has an INSERT trigger. >1 = 指定された種類の最初のトリガーの ID。>1 = ID of first trigger with the specified type. |
TableInsertTriggerCountTableInsertTriggerCount | テーブルTable | テーブルには指定された数の INSERT トリガーがあります。Table has the specified number of INSERT triggers. >0 = INSERT トリガーの数。>0 = The number of INSERT triggers. |
TableIsFakeTableIsFake | テーブルTable | テーブルは実在せず、Table is not real. SQL Server データベース エンジンSQL Server Database Engineによって、要求時に実際の領域が内部で確保されます。It is materialized internally on demand by the SQL Server データベース エンジンSQL Server Database Engine. 1 = True1 = True 0 = False0 = False |
TableIsLockedOnBulkLoadTableIsLockedOnBulkLoad | テーブルTable | bcp または BULK INSERT ジョブによってテーブルがロックされています。Table is locked due to a bcp or BULK INSERT job. 1 = True1 = True 0 = False0 = False |
TableIsMemoryOptimizedTableIsMemoryOptimized | テーブルTable | 適用対象: SQL Server 2014 (12.x)SQL Server 2014 (12.x) 以降。Applies to: SQL Server 2014 (12.x)SQL Server 2014 (12.x) and later. テーブルはメモリ最適化されていますTable is memory optimized 1 = True1 = True 0 = False0 = False 基本データ型: intBase data type: int 詳細については、「インメモリ OLTP (インメモリ最適化)」を参照してください。For more information, see In-Memory OLTP (In-Memory Optimization). |
TableIsPinnedTableIsPinned | テーブルTable | テーブルは固定され、データ キャッシュに確保されています。Table is pinned to be held in the data cache. 0 = False0 = False この機能は SQL Server 2005 (9.x)SQL Server 2005 (9.x) 以降ではサポートされていません。This feature is not supported in SQL Server 2005 (9.x)SQL Server 2005 (9.x) and later. |
TableTextInRowLimitTableTextInRowLimit | テーブルTable | text in row に許可されている最大バイト数。Maximum bytes allowed for text in row. text in row オプションが設定されていない場合は 0 です。0 if text in row option is not set. |
TableUpdateTriggerTableUpdateTrigger | テーブルTable | テーブルに UPDATE トリガーがあります。Table has an UPDATE trigger. > 1 = 指定された種類の最初のトリガーの ID。> 1 = ID of first trigger with the specified type. |
TableUpdateTriggerCountTableUpdateTriggerCount | テーブルTable | テーブルには指定された数の UPDATE トリガーがあります。The table has the specified number of UPDATE triggers. > 0 = UPDATE トリガーの数。> 0 = The number of UPDATE triggers. |
TableHasColumnSetTableHasColumnSet | テーブルTable | テーブルに列セットがあります。Table has a column set. 0 = False0 = False 1 = True1 = True 詳細については、「 列セットの使用」を参照してください。For more information, see Use Column Sets. |
TableTemporalTypeTableTemporalType | テーブルTable | 適用対象: SQL Server 2016 (13.x)SQL Server 2016 (13.x) 以降。Applies to: SQL Server 2016 (13.x)SQL Server 2016 (13.x) and later. テーブルの種類を指定します。Specifies the type of table. 0 = 非テンポラル テーブル0 = non-temporal table 1 = システムのバージョン情報のテーブルの履歴テーブル1 = history table for system-versioned table 2 = システムのバージョン情報のテンポラル テーブル2 = system-versioned temporal table |
戻り値の型Return Types
intint
例外Exceptions
エラーが発生した場合、または呼び出し元にオブジェクトの表示権限がない場合は、NULL が返されます。Returns NULL on error or if a caller does not have permission to view the object.
ユーザーが所有しているか、または権限を与えられている、セキュリティ保護可能なリソースのメタデータのみを表示できます。A user can only view the metadata of securables that the user owns or on which the user has been granted permission. つまり、オブジェクトに対する権限がユーザーに与えられていない場合、メタデータを生成する組み込み関数 (OBJECTPROPERTY など) が NULL を返す可能性があります。This means that metadata-emitting, built-in functions such as OBJECTPROPERTY may return NULL if the user does not have any permission on the object. 詳細については、「 Metadata Visibility Configuration」を参照してください。For more information, see Metadata Visibility Configuration.
注釈Remarks
データベース エンジンDatabase Engine を前提としています object_id が現在のデータベース コンテキストでします。The データベース エンジンDatabase Engine assumes that object_id is in the current database context. 別のデータベースの object_id を参照するクエリは、NULL または正しくない値を返します。A query that references an object_id in another database will return NULL or incorrect results. たとえば、次のクエリでは、現在のデータベース コンテキストは master データベースです。For example, in the following query the current database context is the master database. データベース エンジンDatabase Engineは、クエリ内で指定されたデータベースではなく、このデータベースの指定された object_id のプロパティ値を返します。The データベース エンジンDatabase Engine will try to return the property value for the specified object_id in that database instead of the database specified in the query. ビュー vEmployee
は master データベース内にないため、このクエリでは正しくない結果が返されます。The query returns incorrect results because the view vEmployee
is not in the master database.
USE master;
GO
SELECT OBJECTPROPERTY(OBJECT_ID(N'AdventureWorks2012.HumanResources.vEmployee'), 'IsView');
GO
OBJECTPROPERTY(view_id, 'IsIndexable') は、多くのコンピューター リソースを使用する可能性があります。これは、IsIndexable プロパティを評価するために、ビュー定義、正規化、および部分最適化の解析が必要なためです。OBJECTPROPERTY(view_id, 'IsIndexable') may consume significant computer resources because evaluation of IsIndexable property requires the parsing of view definition, normalization, and partial optimization. IsIndexable プロパティではインデックスを作成できるテーブルまたはビューを指定しますが、特定のインデックス キーの要件が満たされない場合、インデックスの実際の作成は失敗します。Although the IsIndexable property identifies tables or views that can be indexed, the actual creation of the index still might fail if certain index key requirements are not met. 詳細については、「CREATE INDEX (Transact-SQL)」を参照してください。For more information, see CREATE INDEX (Transact-SQL).
OBJECTPROPERTY(table_id, 'TableHasActiveFulltextIndex') は、テーブルの少なくとも 1 つの列にインデックスが作成されている場合は、1 (TRUE) を返します。OBJECTPROPERTY(table_id, 'TableHasActiveFulltextIndex') will return a value of 1 (true) when at least one column of a table is added for indexing. インデックス作成で先頭の列が追加されるとすぐ、フルテキスト インデックス作成が自動的にアクティブになります。Full-text indexing becomes active for population as soon as the first column is added for indexing.
テーブルを作成するときに QUOTED IDENTIFIER オプションが OFF に設定されている場合でも、作成されるテーブルのメタデータでは、このオプションは常に ON として格納されます。When a table is created, the QUOTED IDENTIFIER option is always stored as ON in the metadata of the table, even if the option is set to OFF when the table is created. したがって、OBJECTPROPERTY(table_id, 'IsQuotedIdentOn') は常に 1 (TRUE) を返します。Therefore, OBJECTPROPERTY(table_id, 'IsQuotedIdentOn') will always return a value of 1 (true).
例Examples
A.A. オブジェクトがテーブルかどうかを確認するVerifying that an object is a table
次の例では、UnitMeasure
が AdventureWorks2012AdventureWorks2012 データベースのテーブルかどうかをテストします。The following example tests whether UnitMeasure
is a table in the AdventureWorks2012AdventureWorks2012 database.
USE AdventureWorks2012;
GO
IF OBJECTPROPERTY (OBJECT_ID(N'Production.UnitMeasure'),'ISTABLE') = 1
PRINT 'UnitMeasure is a table.'
ELSE IF OBJECTPROPERTY (OBJECT_ID(N'Production.UnitMeasure'),'ISTABLE') = 0
PRINT 'UnitMeasure is not a table.'
ELSE IF OBJECTPROPERTY (OBJECT_ID(N'Production.UnitMeasure'),'ISTABLE') IS NULL
PRINT 'ERROR: UnitMeasure is not a valid object.';
GO
B.B. スカラー値ユーザー定義関数の決定性を確認するVerifying that a scalar-valued user-defined function is deterministic
次の例では、money 値を返すユーザー定義のスカラー値関数である ufnGetProductDealerPrice
が決定的であるかどうかをテストします。The following example tests whether the user-defined scalar-valued function ufnGetProductDealerPrice
, which returns a money value, is deterministic.
USE AdventureWorks2012;
GO
SELECT OBJECTPROPERTY(OBJECT_ID('dbo.ufnGetProductDealerPrice'), 'IsDeterministic');
GO
結果セットは、ufnGetProductDealerPrice
が決定論的関数でないことを示しています。The result set shows that ufnGetProductDealerPrice
is not a deterministic function.
-----
0
C: 特定のスキーマに属するテーブルを見つけるC: Finding the tables that belong to a specific schema
次の例は、dbo スキーマのすべてのテーブルを返します。The following example returns all the tables in the dbo schema.
-- Uses AdventureWorks
SELECT name, object_id, type_desc
FROM sys.objects
WHERE OBJECTPROPERTY(object_id, N'SchemaId') = SCHEMA_ID(N'dbo')
ORDER BY type_desc, name;
GO
例: Azure Synapse AnalyticsAzure Synapse Analytics、Parallel Data WarehouseParallel Data WarehouseExamples: Azure Synapse AnalyticsAzure Synapse Analytics and Parallel Data WarehouseParallel Data Warehouse
D: オブジェクトがテーブルかどうかを確認するD: Verifying that an object is a table
次の例では、dbo.DimReseller
が AdventureWorksPDW2012AdventureWorksPDW2012 データベースのテーブルかどうかをテストします。The following example tests whether dbo.DimReseller
is a table in the AdventureWorksPDW2012AdventureWorksPDW2012 database.
-- Uses AdventureWorks
IF OBJECTPROPERTY (OBJECT_ID(N'dbo.DimReseller'),'ISTABLE') = 1
SELECT 'DimReseller is a table.'
ELSE
SELECT 'DimReseller is not a table.';
GO
関連項目See Also
COLUMNPROPERTY (Transact-SQL) COLUMNPROPERTY (Transact-SQL)
メタデータ関数 (Transact-SQL) Metadata Functions (Transact-SQL)
OBJECTPROPERTYEX (Transact-SQL) OBJECTPROPERTYEX (Transact-SQL)
ALTER AUTHORIZATION (Transact-SQL) ALTER AUTHORIZATION (Transact-SQL)
TYPEPROPERTY (Transact-SQL) TYPEPROPERTY (Transact-SQL)
sys.objects (Transact-SQL)sys.objects (Transact-SQL)