sp_help (Transact-SQL)sp_help (Transact-SQL)

適用対象: ○SQL Server ○Azure SQL Database XAzure SQL Data Warehouse XParallel Data WarehouseAPPLIES TO: yesSQL Server yesAzure SQL Database noAzure SQL Data Warehouse noParallel Data Warehouse

データベース オブジェクトに関する情報をレポート (で表示されている任意のオブジェクト、 sys.sysobjects互換性ビュー)、ユーザー定義データ型、またはデータ型。Reports information about a database object (any object listed in the sys.sysobjects compatibility view), a user-defined data type, or a data type.

トピック リンク アイコン Transact-SQL 構文表記規則Topic link icon Transact-SQL Syntax Conventions

構文Syntax

  
sp_help [ [ @objname = ] 'name' ]  

引数Arguments

[ @objname = ] 'name' 任意のオブジェクトの名前は、 sysobjectsに任意のユーザー定義データ型、または、 systypesテーブル。[ @objname = ] 'name' Is the name of any object, in sysobjects or any user-defined data type in the systypes table. 名前nvarchar ( 776 ) 、既定値は NULL です。name is nvarchar( 776 ), with a default of NULL. データベース名は受け付けられません。Database names are not acceptable. 'Person.AddressType' や [Person.AddressType] など、2 つまたは 3 つの部分名を区切る必要があります。Two or three part names must be delimited, such as 'Person.AddressType' or [Person.AddressType].

リターン コードの値Return Code Values

0 (成功) または 1 (失敗)0 (success) or 1 (failure)

結果セットResult Sets

返される結果セットが異なるかどうか名前を指定した場合とはどのデータベース オブジェクトを指定します。The result sets that are returned depend on whether name is specified, when it is specified, and which database object it is.

  1. 場合sp_helpが実行される、引数なしで、現在のデータベース内に存在するすべての型のオブジェクトの概要情報が返されます。If sp_help is executed with no arguments, summary information of objects of all types that exist in the current database is returned.

    列名Column name データ型Data type 説明Description
    名前Name nvarchar( 128 )nvarchar( 128 ) オブジェクト名です。Object name
    [所有者]Owner nvarchar( 128 )nvarchar( 128 ) オブジェクトの所有者 (これはオブジェクトを所有するデータベース プリンシパルです。Object owner (This is the database principal that owns object. 既定値、オブジェクトを含むスキーマの所有者です。)Defaults to the owner of the schema that contains the object.)
    Object_typeObject_type nvarchar( 31 )nvarchar( 31 ) オブジェクトの種類Object type
  2. 場合名前は、SQL ServerSQL Serverデータ型またはユーザー定義データ型、 sp_helpこの結果セットを返します。If name is a SQL ServerSQL Server data type or user-defined data type, sp_help returns this result set.

    列名Column name データ型Data type 説明Description
    Type_nameType_name nvarchar( 128 )nvarchar( 128 ) データ型の名前。Data type name.
    Storage_typeStorage_type nvarchar( 128 )nvarchar( 128 ) SQL ServerSQL Server 型名。type name.
    LengthLength smallintsmallint (バイト単位) でのデータ型の物理的な長さ。Physical length of the data type (in bytes).
    precPrec intint 有効桁数 (総桁数) です。Precision (total number of digits).
    ScaleScale intint 小数点の右側にある数字の数。Number of digits to the right of the decimal.
    NULL 値の使用Nullable varchar( 35 )varchar( 35 ) NULL 値を許容するかどうかを示します。イエスかノーか答えてください。Indicates whether NULL values are allowed: Yes or No.
    Default_nameDefault_name nvarchar( 128 )nvarchar( 128 ) このデータ型にバインドされた既定値の名前です。Name of a default bound to this type.

    NULL = No デフォルトをバインドします。NULL = No default is bound.
    規則の名前Rule_name nvarchar( 128 )nvarchar( 128 ) このデータ型にバインドされたルールの名前です。Name of a rule bound to this type.

    NULL = No デフォルトをバインドします。NULL = No default is bound.
    照合順序Collation sysnamesysname データ型の照合順序。Collation of the data type. NULL 以外の文字データ型を表します。NULL for non-character data types.
  3. 場合名前以外のデータ型では、任意のデータベース オブジェクトは、 sp_helpこの結果に指定したオブジェクトの種類に基づいて、設定済みでも追加の結果セットを返します。If name is any database object other than a data type, sp_help returns this result set and also additional result sets, based on the type of object specified.

フィードバックをお待ちしております。 この記事の手順やコード例の中で、古い情報や間違っている情報を見つけた場合は、ぜひお知らせください。We are listening: If you find something outdated or incorrect in this article, such as a step or a code example, please tell us. このページの下部にある [フィードバック] セクション内で [このページ] ボタンをクリックしてください。You can click the This page button in the Feedback section at the bottom of this page. SQL に関するフィードバックのすべての項目に目を通しています (通常は翌日)。We read every item of feedback about SQL, typically the next day. よろしくお願いいたします。Thanks.

|<span data-ttu-id="88f0d-164">列名</span><span class="sxs-lookup"><span data-stu-id="88f0d-164">Column name</span></span>|<span data-ttu-id="88f0d-165">データ型</span><span class="sxs-lookup"><span data-stu-id="88f0d-165">Data type</span></span>|<span data-ttu-id="88f0d-166">説明</span><span class="sxs-lookup"><span data-stu-id="88f0d-166">Description</span></span>|  
|-----------------|---------------|-----------------|  
|<span data-ttu-id="88f0d-167">**名前**</span><span class="sxs-lookup"><span data-stu-id="88f0d-167">**Name**</span></span>|<span data-ttu-id="88f0d-168">**nvarchar(** 128 **)**</span><span class="sxs-lookup"><span data-stu-id="88f0d-168">**nvarchar(** 128 **)**</span></span>|<span data-ttu-id="88f0d-169">テーブル名</span><span class="sxs-lookup"><span data-stu-id="88f0d-169">Table name</span></span>|  
|<span data-ttu-id="88f0d-170">**[所有者]**</span><span class="sxs-lookup"><span data-stu-id="88f0d-170">**Owner**</span></span>|<span data-ttu-id="88f0d-171">**nvarchar(** 128 **)**</span><span class="sxs-lookup"><span data-stu-id="88f0d-171">**nvarchar(** 128 **)**</span></span>|<span data-ttu-id="88f0d-172">テーブルの所有者</span><span class="sxs-lookup"><span data-stu-id="88f0d-172">Table owner</span></span>|  
|<span data-ttu-id="88f0d-173">**型**</span><span class="sxs-lookup"><span data-stu-id="88f0d-173">**Type**</span></span>|<span data-ttu-id="88f0d-174">**nvarchar(** 31 **)**</span><span class="sxs-lookup"><span data-stu-id="88f0d-174">**nvarchar(** 31 **)**</span></span>|<span data-ttu-id="88f0d-175">テーブルの種類です。</span><span class="sxs-lookup"><span data-stu-id="88f0d-175">Table type</span></span>|  
|<span data-ttu-id="88f0d-176">**Created_datetime**</span><span class="sxs-lookup"><span data-stu-id="88f0d-176">**Created_datetime**</span></span>|<span data-ttu-id="88f0d-177">**datetime**</span><span class="sxs-lookup"><span data-stu-id="88f0d-177">**datetime**</span></span>|<span data-ttu-id="88f0d-178">テーブルの作成日</span><span class="sxs-lookup"><span data-stu-id="88f0d-178">Date table created</span></span>|  

 Depending on the database object specified, **sp_help** returns additional result sets.  

 If *name* is a system table, user table, or view, **sp_help** returns the following result sets. However, the result set that describes where the data file is located on a file group is not returned for a view.  

-   <span data-ttu-id="88f0d-179">列オブジェクトに関して次の結果セットが返されます。</span><span class="sxs-lookup"><span data-stu-id="88f0d-179">Additional result set returned on column objects:</span></span>  

    |<span data-ttu-id="88f0d-180">列名</span><span class="sxs-lookup"><span data-stu-id="88f0d-180">Column name</span></span>|<span data-ttu-id="88f0d-181">データ型</span><span class="sxs-lookup"><span data-stu-id="88f0d-181">Data type</span></span>|<span data-ttu-id="88f0d-182">説明</span><span class="sxs-lookup"><span data-stu-id="88f0d-182">Description</span></span>|  
    |-----------------|---------------|-----------------|  
    |<span data-ttu-id="88f0d-183">**Column_name**</span><span class="sxs-lookup"><span data-stu-id="88f0d-183">**Column_name**</span></span>|<span data-ttu-id="88f0d-184">**nvarchar(** 128 **)**</span><span class="sxs-lookup"><span data-stu-id="88f0d-184">**nvarchar(** 128 **)**</span></span>|<span data-ttu-id="88f0d-185">列名</span><span class="sxs-lookup"><span data-stu-id="88f0d-185">Column name.</span></span>|  
    |<span data-ttu-id="88f0d-186">**型**</span><span class="sxs-lookup"><span data-stu-id="88f0d-186">**Type**</span></span>|<span data-ttu-id="88f0d-187">**nvarchar(** 128 **)**</span><span class="sxs-lookup"><span data-stu-id="88f0d-187">**nvarchar(** 128 **)**</span></span>|<span data-ttu-id="88f0d-188">列のデータを入力します。</span><span class="sxs-lookup"><span data-stu-id="88f0d-188">Column data type.</span></span>|  
    |<span data-ttu-id="88f0d-189">**計算**</span><span class="sxs-lookup"><span data-stu-id="88f0d-189">**Computed**</span></span>|<span data-ttu-id="88f0d-190">**varchar(** 35 **)**</span><span class="sxs-lookup"><span data-stu-id="88f0d-190">**varchar(** 35 **)**</span></span>|<span data-ttu-id="88f0d-191">列の値を計算するかどうかを示します。イエスかノーか答えてください。</span><span class="sxs-lookup"><span data-stu-id="88f0d-191">Indicates whether the values in the column are computed: Yes or No.</span></span>|  
    |<span data-ttu-id="88f0d-192">**Length**</span><span class="sxs-lookup"><span data-stu-id="88f0d-192">**Length**</span></span>|<span data-ttu-id="88f0d-193">**int**</span><span class="sxs-lookup"><span data-stu-id="88f0d-193">**int**</span></span>|<span data-ttu-id="88f0d-194">列の長さ (バイト単位)。</span><span class="sxs-lookup"><span data-stu-id="88f0d-194">Column length in bytes.</span></span><br /><br /> <span data-ttu-id="88f0d-195">注:列のデータ型が大きな値の型 (**varchar (max)** 、 **nvarchar (max)** 、 **varbinary (max)** 、または**xml**)、値は-1 として表示されます。</span><span class="sxs-lookup"><span data-stu-id="88f0d-195">Note: If the column data type is a large value type (**varchar(max)**, **nvarchar(max)**, **varbinary(max)**, or **xml**), the value will display as -1.</span></span>|  
    |<span data-ttu-id="88f0d-196">**prec**</span><span class="sxs-lookup"><span data-stu-id="88f0d-196">**Prec**</span></span>|<span data-ttu-id="88f0d-197">**char(** 5 **)**</span><span class="sxs-lookup"><span data-stu-id="88f0d-197">**char(** 5 **)**</span></span>|<span data-ttu-id="88f0d-198">列の有効桁数。</span><span class="sxs-lookup"><span data-stu-id="88f0d-198">Column precision.</span></span>|  
    |<span data-ttu-id="88f0d-199">**Scale**</span><span class="sxs-lookup"><span data-stu-id="88f0d-199">**Scale**</span></span>|<span data-ttu-id="88f0d-200">**char(** 5 **)**</span><span class="sxs-lookup"><span data-stu-id="88f0d-200">**char(** 5 **)**</span></span>|<span data-ttu-id="88f0d-201">列の小数点以下桁数です。</span><span class="sxs-lookup"><span data-stu-id="88f0d-201">Column scale.</span></span>|  
    |<span data-ttu-id="88f0d-202">**NULL 値の使用**</span><span class="sxs-lookup"><span data-stu-id="88f0d-202">**Nullable**</span></span>|<span data-ttu-id="88f0d-203">**varchar(** 35 **)**</span><span class="sxs-lookup"><span data-stu-id="88f0d-203">**varchar(** 35 **)**</span></span>|<span data-ttu-id="88f0d-204">列で NULL 値を許容するかどうかを示します。イエスかノーか答えてください。</span><span class="sxs-lookup"><span data-stu-id="88f0d-204">Indicates whether NULL values are allowed in the column: Yes or No.</span></span>|  
    |<span data-ttu-id="88f0d-205">**TrimTrailingBlanks**</span><span class="sxs-lookup"><span data-stu-id="88f0d-205">**TrimTrailingBlanks**</span></span>|<span data-ttu-id="88f0d-206">**varchar(** 35 **)**</span><span class="sxs-lookup"><span data-stu-id="88f0d-206">**varchar(** 35 **)**</span></span>|<span data-ttu-id="88f0d-207">末尾の空白をトリミングします。</span><span class="sxs-lookup"><span data-stu-id="88f0d-207">Trim the trailing blanks.</span></span> <span data-ttu-id="88f0d-208">はいまたは no を返します。</span><span class="sxs-lookup"><span data-stu-id="88f0d-208">Returns Yes or No.</span></span>|  
    |<span data-ttu-id="88f0d-209">**FixedLenNullInSource**</span><span class="sxs-lookup"><span data-stu-id="88f0d-209">**FixedLenNullInSource**</span></span>|<span data-ttu-id="88f0d-210">**varchar(** 35 **)**</span><span class="sxs-lookup"><span data-stu-id="88f0d-210">**varchar(** 35 **)**</span></span>|<span data-ttu-id="88f0d-211">これは旧バージョンとの互換性のためにだけ用意されています。</span><span class="sxs-lookup"><span data-stu-id="88f0d-211">For backward compatibility only.</span></span>|  
    |<span data-ttu-id="88f0d-212">**照合順序**</span><span class="sxs-lookup"><span data-stu-id="88f0d-212">**Collation**</span></span>|<span data-ttu-id="88f0d-213">**sysname**</span><span class="sxs-lookup"><span data-stu-id="88f0d-213">**sysname**</span></span>|<span data-ttu-id="88f0d-214">列の照合順序です。</span><span class="sxs-lookup"><span data-stu-id="88f0d-214">Collation of the column.</span></span> <span data-ttu-id="88f0d-215">非文字データ型の場合は NULL です。</span><span class="sxs-lookup"><span data-stu-id="88f0d-215">NULL for noncharacter data types.</span></span>|  

-   <span data-ttu-id="88f0d-216">Id 列の追加の結果セットが返されます。</span><span class="sxs-lookup"><span data-stu-id="88f0d-216">Additional result set returned on identity columns:</span></span>  

    |<span data-ttu-id="88f0d-217">列名</span><span class="sxs-lookup"><span data-stu-id="88f0d-217">Column name</span></span>|<span data-ttu-id="88f0d-218">データ型</span><span class="sxs-lookup"><span data-stu-id="88f0d-218">Data type</span></span>|<span data-ttu-id="88f0d-219">説明</span><span class="sxs-lookup"><span data-stu-id="88f0d-219">Description</span></span>|  
    |-----------------|---------------|-----------------|  
    |<span data-ttu-id="88f0d-220">**[ID]**</span><span class="sxs-lookup"><span data-stu-id="88f0d-220">**Identity**</span></span>|<span data-ttu-id="88f0d-221">**nvarchar(** 128 **)**</span><span class="sxs-lookup"><span data-stu-id="88f0d-221">**nvarchar(** 128 **)**</span></span>|<span data-ttu-id="88f0d-222">データ型が id として宣言されている列の名前。</span><span class="sxs-lookup"><span data-stu-id="88f0d-222">Column name whose data type is declared as identity.</span></span>|  
    |<span data-ttu-id="88f0d-223">**シード**</span><span class="sxs-lookup"><span data-stu-id="88f0d-223">**Seed**</span></span>|<span data-ttu-id="88f0d-224">**numeric**</span><span class="sxs-lookup"><span data-stu-id="88f0d-224">**numeric**</span></span>|<span data-ttu-id="88f0d-225">Id 列の値を開始しています。</span><span class="sxs-lookup"><span data-stu-id="88f0d-225">Starting value for the identity column.</span></span>|  
    |<span data-ttu-id="88f0d-226">**Increment**</span><span class="sxs-lookup"><span data-stu-id="88f0d-226">**Increment**</span></span>|<span data-ttu-id="88f0d-227">**numeric**</span><span class="sxs-lookup"><span data-stu-id="88f0d-227">**numeric**</span></span>|<span data-ttu-id="88f0d-228">この列の値を使用する増分値です。</span><span class="sxs-lookup"><span data-stu-id="88f0d-228">Increment to use for values in this column.</span></span>|  
    |<span data-ttu-id="88f0d-229">**[レプリケーションでは使用しない]**</span><span class="sxs-lookup"><span data-stu-id="88f0d-229">**Not For Replication**</span></span>|<span data-ttu-id="88f0d-230">**int**</span><span class="sxs-lookup"><span data-stu-id="88f0d-230">**int**</span></span>|<span data-ttu-id="88f0d-231">IDENTITY プロパティは、レプリケーションのログイン時に適用されませんなど**sqlrepl**テーブルにデータを挿入します。</span><span class="sxs-lookup"><span data-stu-id="88f0d-231">IDENTITY property is not enforced when a replication login, such as **sqlrepl**, inserts data into the table:</span></span><br /><br /> <span data-ttu-id="88f0d-232">1 = True</span><span class="sxs-lookup"><span data-stu-id="88f0d-232">1 = True</span></span><br /><br /> <span data-ttu-id="88f0d-233">0 = False</span><span class="sxs-lookup"><span data-stu-id="88f0d-233">0 = False</span></span>|  

-   <span data-ttu-id="88f0d-234">列の追加の結果セットが返されます。</span><span class="sxs-lookup"><span data-stu-id="88f0d-234">Additional result set returned on columns:</span></span>  

    |<span data-ttu-id="88f0d-235">列名</span><span class="sxs-lookup"><span data-stu-id="88f0d-235">Column name</span></span>|<span data-ttu-id="88f0d-236">データ型</span><span class="sxs-lookup"><span data-stu-id="88f0d-236">Data type</span></span>|<span data-ttu-id="88f0d-237">説明</span><span class="sxs-lookup"><span data-stu-id="88f0d-237">Description</span></span>|  
    |-----------------|---------------|-----------------|  
    |<span data-ttu-id="88f0d-238">**RowGuidCol**</span><span class="sxs-lookup"><span data-stu-id="88f0d-238">**RowGuidCol**</span></span>|<span data-ttu-id="88f0d-239">**sysname**</span><span class="sxs-lookup"><span data-stu-id="88f0d-239">**sysname**</span></span>|<span data-ttu-id="88f0d-240">一意なグローバル識別子列の名前です。</span><span class="sxs-lookup"><span data-stu-id="88f0d-240">Name of the global unique identifier column.</span></span>|  

-   <span data-ttu-id="88f0d-241">ファイル グループに追加の結果セットが返されます。</span><span class="sxs-lookup"><span data-stu-id="88f0d-241">Additional result set returned on filegroups:</span></span>  

    |<span data-ttu-id="88f0d-242">列名</span><span class="sxs-lookup"><span data-stu-id="88f0d-242">Column name</span></span>|<span data-ttu-id="88f0d-243">データ型</span><span class="sxs-lookup"><span data-stu-id="88f0d-243">Data type</span></span>|<span data-ttu-id="88f0d-244">説明</span><span class="sxs-lookup"><span data-stu-id="88f0d-244">Description</span></span>|  
    |-----------------|---------------|-----------------|  
    |<span data-ttu-id="88f0d-245">**Data_located_on_filegroup**</span><span class="sxs-lookup"><span data-stu-id="88f0d-245">**Data_located_on_filegroup**</span></span>|<span data-ttu-id="88f0d-246">**nvarchar(** 128 **)**</span><span class="sxs-lookup"><span data-stu-id="88f0d-246">**nvarchar(** 128 **)**</span></span>|<span data-ttu-id="88f0d-247">データが配置されているファイル グループ:プライマリ、セカンダリ、またはトランザクション ログ</span><span class="sxs-lookup"><span data-stu-id="88f0d-247">Filegroup in which the data is located: Primary, Secondary, or Transaction Log.</span></span>|  

-   <span data-ttu-id="88f0d-248">インデックスの追加の結果セットが返されます。</span><span class="sxs-lookup"><span data-stu-id="88f0d-248">Additional result set returned on indexes:</span></span>  

    |<span data-ttu-id="88f0d-249">列名</span><span class="sxs-lookup"><span data-stu-id="88f0d-249">Column name</span></span>|<span data-ttu-id="88f0d-250">データ型</span><span class="sxs-lookup"><span data-stu-id="88f0d-250">Data type</span></span>|<span data-ttu-id="88f0d-251">説明</span><span class="sxs-lookup"><span data-stu-id="88f0d-251">Description</span></span>|  
    |-----------------|---------------|-----------------|  
    |<span data-ttu-id="88f0d-252">**index_name**</span><span class="sxs-lookup"><span data-stu-id="88f0d-252">**index_name**</span></span>|<span data-ttu-id="88f0d-253">**sysname**</span><span class="sxs-lookup"><span data-stu-id="88f0d-253">**sysname**</span></span>|<span data-ttu-id="88f0d-254">インデックスの名前。</span><span class="sxs-lookup"><span data-stu-id="88f0d-254">Index name.</span></span>|  
    |<span data-ttu-id="88f0d-255">**Index_description**</span><span class="sxs-lookup"><span data-stu-id="88f0d-255">**Index_description**</span></span>|<span data-ttu-id="88f0d-256">**varchar(** 210 **)**</span><span class="sxs-lookup"><span data-stu-id="88f0d-256">**varchar(** 210 **)**</span></span>|<span data-ttu-id="88f0d-257">インデックスの説明です。</span><span class="sxs-lookup"><span data-stu-id="88f0d-257">Description of the index.</span></span>|  
    |<span data-ttu-id="88f0d-258">**index_keys**</span><span class="sxs-lookup"><span data-stu-id="88f0d-258">**index_keys**</span></span>|<span data-ttu-id="88f0d-259">**nvarchar(** 2078 **)**</span><span class="sxs-lookup"><span data-stu-id="88f0d-259">**nvarchar(** 2078 **)**</span></span>|<span data-ttu-id="88f0d-260">インデックスが作成されている列の名前。</span><span class="sxs-lookup"><span data-stu-id="88f0d-260">Column names on which the index is built.</span></span> <span data-ttu-id="88f0d-261">XVelocity メモリ、NULL を返しますには、列ストア インデックスが最適化されています。</span><span class="sxs-lookup"><span data-stu-id="88f0d-261">Returns NULL for xVelocity memory optimized columnstore indexes.</span></span>|  

-   <span data-ttu-id="88f0d-262">制約に関して次の結果セットが返されます。</span><span class="sxs-lookup"><span data-stu-id="88f0d-262">Additional result set returned on constraints:</span></span>  

    |<span data-ttu-id="88f0d-263">列名</span><span class="sxs-lookup"><span data-stu-id="88f0d-263">Column name</span></span>|<span data-ttu-id="88f0d-264">データ型</span><span class="sxs-lookup"><span data-stu-id="88f0d-264">Data type</span></span>|<span data-ttu-id="88f0d-265">説明</span><span class="sxs-lookup"><span data-stu-id="88f0d-265">Description</span></span>|  
    |-----------------|---------------|-----------------|  
    |<span data-ttu-id="88f0d-266">**constraint_type**</span><span class="sxs-lookup"><span data-stu-id="88f0d-266">**constraint_type**</span></span>|<span data-ttu-id="88f0d-267">**nvarchar(** 146 **)**</span><span class="sxs-lookup"><span data-stu-id="88f0d-267">**nvarchar(** 146 **)**</span></span>|<span data-ttu-id="88f0d-268">制約の型。</span><span class="sxs-lookup"><span data-stu-id="88f0d-268">Type of constraint.</span></span>|  
    |<span data-ttu-id="88f0d-269">**constraint_name**</span><span class="sxs-lookup"><span data-stu-id="88f0d-269">**constraint_name**</span></span>|<span data-ttu-id="88f0d-270">**nvarchar(** 128 **)**</span><span class="sxs-lookup"><span data-stu-id="88f0d-270">**nvarchar(** 128 **)**</span></span>|<span data-ttu-id="88f0d-271">制約の名前。</span><span class="sxs-lookup"><span data-stu-id="88f0d-271">Name of the constraint.</span></span>|  
    |<span data-ttu-id="88f0d-272">**delete_action**</span><span class="sxs-lookup"><span data-stu-id="88f0d-272">**delete_action**</span></span>|<span data-ttu-id="88f0d-273">**nvarchar(** 9 **)**</span><span class="sxs-lookup"><span data-stu-id="88f0d-273">**nvarchar(** 9 **)**</span></span>|<span data-ttu-id="88f0d-274">削除操作があるかを示します。NO_ACTION、CASCADE、set _、SET_DEFAULT、または該当なし。</span><span class="sxs-lookup"><span data-stu-id="88f0d-274">Indicates whether the DELETE action is: NO_ACTION, CASCADE, SET_NULL, SET_DEFAULT, or N/A.</span></span><br /><br /> <span data-ttu-id="88f0d-275">ただし、FOREIGN KEY 制約にだけ適用されます。</span><span class="sxs-lookup"><span data-stu-id="88f0d-275">Only applicable to FOREIGN KEY constraints.</span></span>|  
    |<span data-ttu-id="88f0d-276">**update_action**</span><span class="sxs-lookup"><span data-stu-id="88f0d-276">**update_action**</span></span>|<span data-ttu-id="88f0d-277">**nvarchar(** 9 **)**</span><span class="sxs-lookup"><span data-stu-id="88f0d-277">**nvarchar(** 9 **)**</span></span>|<span data-ttu-id="88f0d-278">更新操作があるかを示します。NO_ACTION、CASCADE、set _、SET_DEFAULT、または該当なし。</span><span class="sxs-lookup"><span data-stu-id="88f0d-278">Indicates whether the UPDATE action is: NO_ACTION, CASCADE, SET_NULL, SET_DEFAULT, or N/A.</span></span><br /><br /> <span data-ttu-id="88f0d-279">ただし、FOREIGN KEY 制約にだけ適用されます。</span><span class="sxs-lookup"><span data-stu-id="88f0d-279">Only applicable to FOREIGN KEY constraints.</span></span>|  
    |<span data-ttu-id="88f0d-280">**status_enabled**</span><span class="sxs-lookup"><span data-stu-id="88f0d-280">**status_enabled**</span></span>|<span data-ttu-id="88f0d-281">**varchar(** 8 **)**</span><span class="sxs-lookup"><span data-stu-id="88f0d-281">**varchar(** 8 **)**</span></span>|<span data-ttu-id="88f0d-282">制約が有効になっているかどうかを示します。有効、無効な場合、または該当なし。</span><span class="sxs-lookup"><span data-stu-id="88f0d-282">Indicates whether the constraint is enabled: Enabled, Disabled, or N/A.</span></span><br /><br /> <span data-ttu-id="88f0d-283">CHECK および FOREIGN KEY 制約にのみ適用されます。</span><span class="sxs-lookup"><span data-stu-id="88f0d-283">Only applicable to CHECK and FOREIGN KEY constraints.</span></span>|  
    |<span data-ttu-id="88f0d-284">**status_for_replication**</span><span class="sxs-lookup"><span data-stu-id="88f0d-284">**status_for_replication**</span></span>|<span data-ttu-id="88f0d-285">**varchar(** 19 **)**</span><span class="sxs-lookup"><span data-stu-id="88f0d-285">**varchar(** 19 **)**</span></span>|<span data-ttu-id="88f0d-286">制約がレプリケーションを対象とするのかどうかを示します。</span><span class="sxs-lookup"><span data-stu-id="88f0d-286">Indicates whether the constraint is for replication.</span></span><br /><br /> <span data-ttu-id="88f0d-287">CHECK および FOREIGN KEY 制約にのみ適用されます。</span><span class="sxs-lookup"><span data-stu-id="88f0d-287">Only applicable to CHECK and FOREIGN KEY constraints.</span></span>|  
    |<span data-ttu-id="88f0d-288">**constraint_keys**</span><span class="sxs-lookup"><span data-stu-id="88f0d-288">**constraint_keys**</span></span>|<span data-ttu-id="88f0d-289">**nvarchar(** 2078 **)**</span><span class="sxs-lookup"><span data-stu-id="88f0d-289">**nvarchar(** 2078 **)**</span></span>|<span data-ttu-id="88f0d-290">制約を構成する列の名前です。デフォルトおよびルールの場合は、デフォルトまたはルールを定義するテキストです。</span><span class="sxs-lookup"><span data-stu-id="88f0d-290">Names of the columns that make up the constraint or, in the case for defaults and rules, the text that defines the default or rule.</span></span>|  

-   <span data-ttu-id="88f0d-291">参照先のオブジェクトに追加の結果セットが返されます。</span><span class="sxs-lookup"><span data-stu-id="88f0d-291">Additional result set returned on referencing objects:</span></span>  

    |<span data-ttu-id="88f0d-292">列名</span><span class="sxs-lookup"><span data-stu-id="88f0d-292">Column name</span></span>|<span data-ttu-id="88f0d-293">データ型</span><span class="sxs-lookup"><span data-stu-id="88f0d-293">Data type</span></span>|<span data-ttu-id="88f0d-294">説明</span><span class="sxs-lookup"><span data-stu-id="88f0d-294">Description</span></span>|  
    |-----------------|---------------|-----------------|  
    |<span data-ttu-id="88f0d-295">**によって参照されるテーブル**</span><span class="sxs-lookup"><span data-stu-id="88f0d-295">**Table is referenced by**</span></span>|<span data-ttu-id="88f0d-296">**nvarchar(** 516 **)**</span><span class="sxs-lookup"><span data-stu-id="88f0d-296">**nvarchar(** 516 **)**</span></span>|<span data-ttu-id="88f0d-297">テーブルを参照する他のデータベース オブジェクトを識別します。</span><span class="sxs-lookup"><span data-stu-id="88f0d-297">Identifies other database objects that reference the table.</span></span>|  

-   <span data-ttu-id="88f0d-298">ストアド プロシージャ、関数、または拡張ストアド プロシージャに関して次の結果セットが返されます。</span><span class="sxs-lookup"><span data-stu-id="88f0d-298">Additional result set returned on stored procedures, functions, or extended stored procedures.</span></span>  

    |<span data-ttu-id="88f0d-299">列名</span><span class="sxs-lookup"><span data-stu-id="88f0d-299">Column name</span></span>|<span data-ttu-id="88f0d-300">データ型</span><span class="sxs-lookup"><span data-stu-id="88f0d-300">Data type</span></span>|<span data-ttu-id="88f0d-301">説明</span><span class="sxs-lookup"><span data-stu-id="88f0d-301">Description</span></span>|  
    |-----------------|---------------|-----------------|  
    |<span data-ttu-id="88f0d-302">**Parameter_name**</span><span class="sxs-lookup"><span data-stu-id="88f0d-302">**Parameter_name**</span></span>|<span data-ttu-id="88f0d-303">**nvarchar(** 128 **)**</span><span class="sxs-lookup"><span data-stu-id="88f0d-303">**nvarchar(** 128 **)**</span></span>|<span data-ttu-id="88f0d-304">ストアド プロシージャ パラメーターの名前。</span><span class="sxs-lookup"><span data-stu-id="88f0d-304">Stored procedure parameter name.</span></span>|  
    |<span data-ttu-id="88f0d-305">**型**</span><span class="sxs-lookup"><span data-stu-id="88f0d-305">**Type**</span></span>|<span data-ttu-id="88f0d-306">**nvarchar(** 128 **)**</span><span class="sxs-lookup"><span data-stu-id="88f0d-306">**nvarchar(** 128 **)**</span></span>|<span data-ttu-id="88f0d-307">ストアド プロシージャのパラメーターのデータ型。</span><span class="sxs-lookup"><span data-stu-id="88f0d-307">Data type of the stored procedure parameter.</span></span>|  
    |<span data-ttu-id="88f0d-308">**Length**</span><span class="sxs-lookup"><span data-stu-id="88f0d-308">**Length**</span></span>|<span data-ttu-id="88f0d-309">**smallint**</span><span class="sxs-lookup"><span data-stu-id="88f0d-309">**smallint**</span></span>|<span data-ttu-id="88f0d-310">最大物理記憶域の長さ (バイト単位)。</span><span class="sxs-lookup"><span data-stu-id="88f0d-310">Maximum physical storage length, in bytes.</span></span>|  
    |<span data-ttu-id="88f0d-311">**prec**</span><span class="sxs-lookup"><span data-stu-id="88f0d-311">**Prec**</span></span>|<span data-ttu-id="88f0d-312">**int**</span><span class="sxs-lookup"><span data-stu-id="88f0d-312">**int**</span></span>|<span data-ttu-id="88f0d-313">桁数または有効桁数の合計数。</span><span class="sxs-lookup"><span data-stu-id="88f0d-313">Precision or total number of digits.</span></span>|  
    |<span data-ttu-id="88f0d-314">**Scale**</span><span class="sxs-lookup"><span data-stu-id="88f0d-314">**Scale**</span></span>|<span data-ttu-id="88f0d-315">**int**</span><span class="sxs-lookup"><span data-stu-id="88f0d-315">**int**</span></span>|<span data-ttu-id="88f0d-316">小数点の右側にある数字の数。</span><span class="sxs-lookup"><span data-stu-id="88f0d-316">Number of digits to the right of the decimal point.</span></span>|  
    |<span data-ttu-id="88f0d-317">**Param_order**</span><span class="sxs-lookup"><span data-stu-id="88f0d-317">**Param_order**</span></span>|<span data-ttu-id="88f0d-318">**smallint**</span><span class="sxs-lookup"><span data-stu-id="88f0d-318">**smallint**</span></span>|<span data-ttu-id="88f0d-319">パラメーターの順番です。</span><span class="sxs-lookup"><span data-stu-id="88f0d-319">Order of the parameter.</span></span>|  

コメントRemarks

Sp_helpプロシージャは、現在のデータベースのみでオブジェクトを検索します。The sp_help procedure looks for an object in the current database only.

ときに名前が指定されていないsp_help名、所有者、および現在のデータベース内のすべてのオブジェクトのオブジェクトの種類のオブジェクトを表示します。When name is not specified, sp_help lists object names, owners, and object types for all objects in the current database. sp_helptriggerトリガーに関する情報を提供します。sp_helptrigger provides information about triggers.

sp_helpは順序付け可能なインデックス列だけを公開します。 したがって、これは公開されません XML インデックスまたは空間インデックスに関する情報。sp_help exposes only orderable index columns; therefore, it does not expose information about XML indexes or spatial indexes.

アクセス許可Permissions

ロール public のメンバーシップが必要です。Requires membership in the public role. ユーザーに対する権限が必要に少なくとも 1 つobjnameします。The user must have at least one permission on objname. 列の制約キー、既定値、またはルールを表示するには、テーブルに対する VIEW DEFINITION 権限が必要です。To view column constraint keys, defaults, or rules, you must have VIEW DEFINITION permission on the table.

使用例Examples

A.A. すべてのオブジェクトに関する情報を返すReturning information about all objects

次の例では、各オブジェクトに関する情報を一覧表示、masterデータベース。The following example lists information about each object in the master database.

USE master;  
GO  
EXEC sp_help;  
GO  

B.B. 1 つのオブジェクトに関する情報を返すReturning information about a single object

次の例では、に関する情報を表示、Personテーブル。The following example displays information about the Person table.

USE AdventureWorks2012;  
GO  
EXEC sp_help 'Person.Person';  
GO  

関連項目See Also

データベース エンジン ストアド プロシージャ(TRANSACT-SQL) Database Engine Stored Procedures (Transact-SQL)
sp_helpindex (TRANSACT-SQL) sp_helpindex (Transact-SQL)
sp_helprotect (Transact-SQL) sp_helprotect (Transact-SQL)
sp_helpserver (Transact-SQL) sp_helpserver (Transact-SQL)
sp_helptrigger (Transact-SQL) sp_helptrigger (Transact-SQL)
sp_helpuser (TRANSACT-SQL) sp_helpuser (Transact-SQL)
システム ストアド プロシージャ (Transact-SQL) System Stored Procedures (Transact-SQL)
sys.sysobjects (TRANSACT-SQL)sys.sysobjects (Transact-SQL)