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

SE APLICA A: síSQL Server síAzure SQL Database noAzure SQL Data Warehouse noAlmacenamiento de datos paralelos APPLIES TO: yesSQL Server yesAzure SQL Database noAzure SQL Data Warehouse noParallel Data Warehouse

Proporciona información acerca de un objeto de base de datos (todos los objetos enumerados en la sys.sysobjects vista de compatibilidad), un tipo de datos definido por el usuario o un tipo de datos.Reports information about a database object (any object listed in the sys.sysobjects compatibility view), a user-defined data type, or a data type.

Icono de vínculo de tema Convenciones de sintaxis de Transact-SQLTopic link icon Transact-SQL Syntax Conventions

SintaxisSyntax

  
sp_help [ [ @objname = ] 'name' ]  

ArgumentosArguments

[ @objname = ] 'name' Es el nombre de cualquier objeto, en sysobjects o cualquier dato definido por el usuario escriba en el systypes tabla.[ @objname = ] 'name' Is the name of any object, in sysobjects or any user-defined data type in the systypes table. nombre es nvarchar ( 776 ) , su valor predeterminado es null.name is nvarchar( 776 ), with a default of NULL. No se aceptan nombres de bases de datos.Database names are not acceptable. Se deben delimitar dos o tres nombres de partes, como "Person.AddressType" o [Person.AddressType].Two or three part names must be delimited, such as 'Person.AddressType' or [Person.AddressType].

Valores de código de retornoReturn Code Values

0 (correcto) o 1 (error)0 (success) or 1 (failure)

Conjuntos de resultadosResult Sets

Los conjuntos de resultados devueltos dependen de si nombre está especificado, cuando se especifica y es el objeto de base de datos.The result sets that are returned depend on whether name is specified, when it is specified, and which database object it is.

  1. Si sp_help se ejecuta sin argumentos, se devuelve información de resumen de los objetos de todos los tipos que existen en la base de datos actual.If sp_help is executed with no arguments, summary information of objects of all types that exist in the current database is returned.

    Nombre de columnaColumn name Tipo de datosData type DescripciónDescription
    NameName nvarchar( 128 )nvarchar( 128 ) Nombre del objetoObject name
    PropietarioOwner nvarchar( 128 )nvarchar( 128 ) Propietario del objeto (esta es la entidad de seguridad de base de datos que posee el objeto.Object owner (This is the database principal that owns object. De forma predeterminada, es el propietario del esquema que contiene el objeto).Defaults to the owner of the schema that contains the object.)
    Object_typeObject_type nvarchar( 31 )nvarchar( 31 ) Tipo de objetoObject type
  2. Si nombre es un SQL ServerSQL Server tipo de datos o tipo de datos definido por el usuario, sp_help devuelve este conjunto de resultados.If name is a SQL ServerSQL Server data type or user-defined data type, sp_help returns this result set.

    Nombre de columnaColumn name Tipo de datosData type DescripciónDescription
    Type_nameType_name nvarchar( 128 )nvarchar( 128 ) Nombre del tipo de datos.Data type name.
    Storage_typeStorage_type nvarchar( 128 )nvarchar( 128 ) Nombre del tipo de SQL ServerSQL Server.SQL ServerSQL Server type name.
    LongitudLength smallintsmallint Longitud física del tipo de datos (en bytes).Physical length of the data type (in bytes).
    PrecPrec intint Precisión (número total de dígitos).Precision (total number of digits).
    EscalaScale intint Número de dígitos a la derecha del separador decimal.Number of digits to the right of the decimal.
    Admisión de valores NULLNullable varchar( 35 )varchar( 35 ) Indica si se permiten valores NULL: Sí o No.Indicates whether NULL values are allowed: Yes or No.
    Default_nameDefault_name nvarchar( 128 )nvarchar( 128 ) Nombre de un valor predeterminado enlazado a este tipo.Name of a default bound to this type.

    NULL = No hay un valor predeterminado enlazado.NULL = No default is bound.
    Nombre_reglaRule_name nvarchar( 128 )nvarchar( 128 ) Nombre de una regla enlazada a este tipo.Name of a rule bound to this type.

    NULL = No hay un valor predeterminado enlazado.NULL = No default is bound.
    IntercalaciónCollation sysnamesysname Intercalación del tipo de datos.Collation of the data type. NULL para tipos de datos que no sean de caracteres.NULL for non-character data types.
  3. Si nombre es cualquier objeto de base de datos que no sea un tipo de datos, sp_help devuelve este resultado conjuntos de resultados establecido y también adicionales, según el tipo del objeto especificado.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.

Le escuchamos: Si encuentra algo obsoleto o incorrecto en este artículo, como un paso o un ejemplo de código, indíquenoslo.We are listening: If you find something outdated or incorrect in this article, such as a step or a code example, please tell us. Puede hacer clic en el botón Esta página situado en la sección Comentarios en la parte inferior de esta página.You can click the This page button in the Feedback section at the bottom of this page. Leemos todos los elementos de comentarios sobre SQL, normalmente el día siguiente.We read every item of feedback about SQL, typically the next day. Gracias.Thanks.

|<span data-ttu-id="e7f53-164">Nombre de columna</span><span class="sxs-lookup"><span data-stu-id="e7f53-164">Column name</span></span>|<span data-ttu-id="e7f53-165">Tipo de datos</span><span class="sxs-lookup"><span data-stu-id="e7f53-165">Data type</span></span>|<span data-ttu-id="e7f53-166">Descripción</span><span class="sxs-lookup"><span data-stu-id="e7f53-166">Description</span></span>|  
|-----------------|---------------|-----------------|  
|<span data-ttu-id="e7f53-167">**Name**</span><span class="sxs-lookup"><span data-stu-id="e7f53-167">**Name**</span></span>|<span data-ttu-id="e7f53-168">**nvarchar(** 128 **)**</span><span class="sxs-lookup"><span data-stu-id="e7f53-168">**nvarchar(** 128 **)**</span></span>|<span data-ttu-id="e7f53-169">Nombre de tabla</span><span class="sxs-lookup"><span data-stu-id="e7f53-169">Table name</span></span>|  
|<span data-ttu-id="e7f53-170">**Propietario**</span><span class="sxs-lookup"><span data-stu-id="e7f53-170">**Owner**</span></span>|<span data-ttu-id="e7f53-171">**nvarchar(** 128 **)**</span><span class="sxs-lookup"><span data-stu-id="e7f53-171">**nvarchar(** 128 **)**</span></span>|<span data-ttu-id="e7f53-172">Propietario de la tabla.</span><span class="sxs-lookup"><span data-stu-id="e7f53-172">Table owner</span></span>|  
|<span data-ttu-id="e7f53-173">**Tipo**</span><span class="sxs-lookup"><span data-stu-id="e7f53-173">**Type**</span></span>|<span data-ttu-id="e7f53-174">**nvarchar(** 31 **)**</span><span class="sxs-lookup"><span data-stu-id="e7f53-174">**nvarchar(** 31 **)**</span></span>|<span data-ttu-id="e7f53-175">Tipo de tabla.</span><span class="sxs-lookup"><span data-stu-id="e7f53-175">Table type</span></span>|  
|<span data-ttu-id="e7f53-176">**Created_datetime**</span><span class="sxs-lookup"><span data-stu-id="e7f53-176">**Created_datetime**</span></span>|<span data-ttu-id="e7f53-177">**datetime**</span><span class="sxs-lookup"><span data-stu-id="e7f53-177">**datetime**</span></span>|<span data-ttu-id="e7f53-178">Tabla de fechas creado</span><span class="sxs-lookup"><span data-stu-id="e7f53-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="e7f53-179">Conjunto de resultados adicional devuelto en los objetos de columna:</span><span class="sxs-lookup"><span data-stu-id="e7f53-179">Additional result set returned on column objects:</span></span>  

    |<span data-ttu-id="e7f53-180">Nombre de columna</span><span class="sxs-lookup"><span data-stu-id="e7f53-180">Column name</span></span>|<span data-ttu-id="e7f53-181">Tipo de datos</span><span class="sxs-lookup"><span data-stu-id="e7f53-181">Data type</span></span>|<span data-ttu-id="e7f53-182">Descripción</span><span class="sxs-lookup"><span data-stu-id="e7f53-182">Description</span></span>|  
    |-----------------|---------------|-----------------|  
    |<span data-ttu-id="e7f53-183">**Column_name**</span><span class="sxs-lookup"><span data-stu-id="e7f53-183">**Column_name**</span></span>|<span data-ttu-id="e7f53-184">**nvarchar(** 128 **)**</span><span class="sxs-lookup"><span data-stu-id="e7f53-184">**nvarchar(** 128 **)**</span></span>|<span data-ttu-id="e7f53-185">Nombre de columna.</span><span class="sxs-lookup"><span data-stu-id="e7f53-185">Column name.</span></span>|  
    |<span data-ttu-id="e7f53-186">**Tipo**</span><span class="sxs-lookup"><span data-stu-id="e7f53-186">**Type**</span></span>|<span data-ttu-id="e7f53-187">**nvarchar(** 128 **)**</span><span class="sxs-lookup"><span data-stu-id="e7f53-187">**nvarchar(** 128 **)**</span></span>|<span data-ttu-id="e7f53-188">Tipo de datos de la columna.</span><span class="sxs-lookup"><span data-stu-id="e7f53-188">Column data type.</span></span>|  
    |<span data-ttu-id="e7f53-189">**Calculado**</span><span class="sxs-lookup"><span data-stu-id="e7f53-189">**Computed**</span></span>|<span data-ttu-id="e7f53-190">**varchar(** 35 **)**</span><span class="sxs-lookup"><span data-stu-id="e7f53-190">**varchar(** 35 **)**</span></span>|<span data-ttu-id="e7f53-191">Indica si se calculan los valores de la columna: Sí o No.</span><span class="sxs-lookup"><span data-stu-id="e7f53-191">Indicates whether the values in the column are computed: Yes or No.</span></span>|  
    |<span data-ttu-id="e7f53-192">**Longitud**</span><span class="sxs-lookup"><span data-stu-id="e7f53-192">**Length**</span></span>|<span data-ttu-id="e7f53-193">**int**</span><span class="sxs-lookup"><span data-stu-id="e7f53-193">**int**</span></span>|<span data-ttu-id="e7f53-194">Longitud de la columna en bytes.</span><span class="sxs-lookup"><span data-stu-id="e7f53-194">Column length in bytes.</span></span><br /><br /> <span data-ttu-id="e7f53-195">Nota: Si el tipo de datos de columna es un tipo de valor grande (**varchar (max)** , **nvarchar (max)** , **varbinary (max)** , o **xml**), el valor será se mostrará como -1.</span><span class="sxs-lookup"><span data-stu-id="e7f53-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="e7f53-196">**Prec**</span><span class="sxs-lookup"><span data-stu-id="e7f53-196">**Prec**</span></span>|<span data-ttu-id="e7f53-197">**char(** 5 **)**</span><span class="sxs-lookup"><span data-stu-id="e7f53-197">**char(** 5 **)**</span></span>|<span data-ttu-id="e7f53-198">Precisión de columna.</span><span class="sxs-lookup"><span data-stu-id="e7f53-198">Column precision.</span></span>|  
    |<span data-ttu-id="e7f53-199">**Escala**</span><span class="sxs-lookup"><span data-stu-id="e7f53-199">**Scale**</span></span>|<span data-ttu-id="e7f53-200">**char(** 5 **)**</span><span class="sxs-lookup"><span data-stu-id="e7f53-200">**char(** 5 **)**</span></span>|<span data-ttu-id="e7f53-201">Escala de la columna.</span><span class="sxs-lookup"><span data-stu-id="e7f53-201">Column scale.</span></span>|  
    |<span data-ttu-id="e7f53-202">**Admisión de valores NULL**</span><span class="sxs-lookup"><span data-stu-id="e7f53-202">**Nullable**</span></span>|<span data-ttu-id="e7f53-203">**varchar(** 35 **)**</span><span class="sxs-lookup"><span data-stu-id="e7f53-203">**varchar(** 35 **)**</span></span>|<span data-ttu-id="e7f53-204">Indica si se permiten valores NULL en la columna: Sí o No.</span><span class="sxs-lookup"><span data-stu-id="e7f53-204">Indicates whether NULL values are allowed in the column: Yes or No.</span></span>|  
    |<span data-ttu-id="e7f53-205">**TrimTrailingBlanks**</span><span class="sxs-lookup"><span data-stu-id="e7f53-205">**TrimTrailingBlanks**</span></span>|<span data-ttu-id="e7f53-206">**varchar(** 35 **)**</span><span class="sxs-lookup"><span data-stu-id="e7f53-206">**varchar(** 35 **)**</span></span>|<span data-ttu-id="e7f53-207">Recorta los espacios en blanco finales.</span><span class="sxs-lookup"><span data-stu-id="e7f53-207">Trim the trailing blanks.</span></span> <span data-ttu-id="e7f53-208">Devuelve Yes o No.</span><span class="sxs-lookup"><span data-stu-id="e7f53-208">Returns Yes or No.</span></span>|  
    |<span data-ttu-id="e7f53-209">**FixedLenNullInSource**</span><span class="sxs-lookup"><span data-stu-id="e7f53-209">**FixedLenNullInSource**</span></span>|<span data-ttu-id="e7f53-210">**varchar(** 35 **)**</span><span class="sxs-lookup"><span data-stu-id="e7f53-210">**varchar(** 35 **)**</span></span>|<span data-ttu-id="e7f53-211">Se conserva únicamente por compatibilidad con versiones anteriores.</span><span class="sxs-lookup"><span data-stu-id="e7f53-211">For backward compatibility only.</span></span>|  
    |<span data-ttu-id="e7f53-212">**Intercalación**</span><span class="sxs-lookup"><span data-stu-id="e7f53-212">**Collation**</span></span>|<span data-ttu-id="e7f53-213">**sysname**</span><span class="sxs-lookup"><span data-stu-id="e7f53-213">**sysname**</span></span>|<span data-ttu-id="e7f53-214">Intercalación de la columna.</span><span class="sxs-lookup"><span data-stu-id="e7f53-214">Collation of the column.</span></span> <span data-ttu-id="e7f53-215">NULL para los tipos de datos que no son caracteres.</span><span class="sxs-lookup"><span data-stu-id="e7f53-215">NULL for noncharacter data types.</span></span>|  

-   <span data-ttu-id="e7f53-216">Conjunto de resultados adicional devuelto en las columnas de identidad:</span><span class="sxs-lookup"><span data-stu-id="e7f53-216">Additional result set returned on identity columns:</span></span>  

    |<span data-ttu-id="e7f53-217">Nombre de columna</span><span class="sxs-lookup"><span data-stu-id="e7f53-217">Column name</span></span>|<span data-ttu-id="e7f53-218">Tipo de datos</span><span class="sxs-lookup"><span data-stu-id="e7f53-218">Data type</span></span>|<span data-ttu-id="e7f53-219">Descripción</span><span class="sxs-lookup"><span data-stu-id="e7f53-219">Description</span></span>|  
    |-----------------|---------------|-----------------|  
    |<span data-ttu-id="e7f53-220">**Identidad**</span><span class="sxs-lookup"><span data-stu-id="e7f53-220">**Identity**</span></span>|<span data-ttu-id="e7f53-221">**nvarchar(** 128 **)**</span><span class="sxs-lookup"><span data-stu-id="e7f53-221">**nvarchar(** 128 **)**</span></span>|<span data-ttu-id="e7f53-222">Nombre de la columna cuyo tipo de datos se declara como identidad.</span><span class="sxs-lookup"><span data-stu-id="e7f53-222">Column name whose data type is declared as identity.</span></span>|  
    |<span data-ttu-id="e7f53-223">**Valor de inicialización**</span><span class="sxs-lookup"><span data-stu-id="e7f53-223">**Seed**</span></span>|<span data-ttu-id="e7f53-224">**numeric**</span><span class="sxs-lookup"><span data-stu-id="e7f53-224">**numeric**</span></span>|<span data-ttu-id="e7f53-225">Valor inicial de la columna de identidad.</span><span class="sxs-lookup"><span data-stu-id="e7f53-225">Starting value for the identity column.</span></span>|  
    |<span data-ttu-id="e7f53-226">**Incremento**</span><span class="sxs-lookup"><span data-stu-id="e7f53-226">**Increment**</span></span>|<span data-ttu-id="e7f53-227">**numeric**</span><span class="sxs-lookup"><span data-stu-id="e7f53-227">**numeric**</span></span>|<span data-ttu-id="e7f53-228">Incremento que se va a utilizar en los valores de esta columna.</span><span class="sxs-lookup"><span data-stu-id="e7f53-228">Increment to use for values in this column.</span></span>|  
    |<span data-ttu-id="e7f53-229">**No disponible para replicación**</span><span class="sxs-lookup"><span data-stu-id="e7f53-229">**Not For Replication**</span></span>|<span data-ttu-id="e7f53-230">**int**</span><span class="sxs-lookup"><span data-stu-id="e7f53-230">**int**</span></span>|<span data-ttu-id="e7f53-231">Propiedad IDENTITY no se aplica cuando un inicio de sesión de replicación, como **sqlrepl**, inserta datos en la tabla:</span><span class="sxs-lookup"><span data-stu-id="e7f53-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="e7f53-232">1 = True</span><span class="sxs-lookup"><span data-stu-id="e7f53-232">1 = True</span></span><br /><br /> <span data-ttu-id="e7f53-233">0 = False</span><span class="sxs-lookup"><span data-stu-id="e7f53-233">0 = False</span></span>|  

-   <span data-ttu-id="e7f53-234">Conjunto de resultados adicional devuelto en las columnas:</span><span class="sxs-lookup"><span data-stu-id="e7f53-234">Additional result set returned on columns:</span></span>  

    |<span data-ttu-id="e7f53-235">Nombre de columna</span><span class="sxs-lookup"><span data-stu-id="e7f53-235">Column name</span></span>|<span data-ttu-id="e7f53-236">Tipo de datos</span><span class="sxs-lookup"><span data-stu-id="e7f53-236">Data type</span></span>|<span data-ttu-id="e7f53-237">Descripción</span><span class="sxs-lookup"><span data-stu-id="e7f53-237">Description</span></span>|  
    |-----------------|---------------|-----------------|  
    |<span data-ttu-id="e7f53-238">**RowGuidCol**</span><span class="sxs-lookup"><span data-stu-id="e7f53-238">**RowGuidCol**</span></span>|<span data-ttu-id="e7f53-239">**sysname**</span><span class="sxs-lookup"><span data-stu-id="e7f53-239">**sysname**</span></span>|<span data-ttu-id="e7f53-240">Nombre de la columna de identificador único global.</span><span class="sxs-lookup"><span data-stu-id="e7f53-240">Name of the global unique identifier column.</span></span>|  

-   <span data-ttu-id="e7f53-241">Conjunto de resultados adicional devuelto en los grupos de archivos:</span><span class="sxs-lookup"><span data-stu-id="e7f53-241">Additional result set returned on filegroups:</span></span>  

    |<span data-ttu-id="e7f53-242">Nombre de columna</span><span class="sxs-lookup"><span data-stu-id="e7f53-242">Column name</span></span>|<span data-ttu-id="e7f53-243">Tipo de datos</span><span class="sxs-lookup"><span data-stu-id="e7f53-243">Data type</span></span>|<span data-ttu-id="e7f53-244">Descripción</span><span class="sxs-lookup"><span data-stu-id="e7f53-244">Description</span></span>|  
    |-----------------|---------------|-----------------|  
    |<span data-ttu-id="e7f53-245">**Data_located_on_filegroup**</span><span class="sxs-lookup"><span data-stu-id="e7f53-245">**Data_located_on_filegroup**</span></span>|<span data-ttu-id="e7f53-246">**nvarchar(** 128 **)**</span><span class="sxs-lookup"><span data-stu-id="e7f53-246">**nvarchar(** 128 **)**</span></span>|<span data-ttu-id="e7f53-247">En el que se encuentran los datos del grupo de archivos: Principal, secundario o registro de transacciones.</span><span class="sxs-lookup"><span data-stu-id="e7f53-247">Filegroup in which the data is located: Primary, Secondary, or Transaction Log.</span></span>|  

-   <span data-ttu-id="e7f53-248">Conjunto de resultados adicional devuelto en los índices:</span><span class="sxs-lookup"><span data-stu-id="e7f53-248">Additional result set returned on indexes:</span></span>  

    |<span data-ttu-id="e7f53-249">Nombre de columna</span><span class="sxs-lookup"><span data-stu-id="e7f53-249">Column name</span></span>|<span data-ttu-id="e7f53-250">Tipo de datos</span><span class="sxs-lookup"><span data-stu-id="e7f53-250">Data type</span></span>|<span data-ttu-id="e7f53-251">Descripción</span><span class="sxs-lookup"><span data-stu-id="e7f53-251">Description</span></span>|  
    |-----------------|---------------|-----------------|  
    |<span data-ttu-id="e7f53-252">**index_name**</span><span class="sxs-lookup"><span data-stu-id="e7f53-252">**index_name**</span></span>|<span data-ttu-id="e7f53-253">**sysname**</span><span class="sxs-lookup"><span data-stu-id="e7f53-253">**sysname**</span></span>|<span data-ttu-id="e7f53-254">Nombre del índice.</span><span class="sxs-lookup"><span data-stu-id="e7f53-254">Index name.</span></span>|  
    |<span data-ttu-id="e7f53-255">**Index_description**</span><span class="sxs-lookup"><span data-stu-id="e7f53-255">**Index_description**</span></span>|<span data-ttu-id="e7f53-256">**varchar(** 210 **)**</span><span class="sxs-lookup"><span data-stu-id="e7f53-256">**varchar(** 210 **)**</span></span>|<span data-ttu-id="e7f53-257">Descripción del índice.</span><span class="sxs-lookup"><span data-stu-id="e7f53-257">Description of the index.</span></span>|  
    |<span data-ttu-id="e7f53-258">**index_keys**</span><span class="sxs-lookup"><span data-stu-id="e7f53-258">**index_keys**</span></span>|<span data-ttu-id="e7f53-259">**nvarchar(** 2078 **)**</span><span class="sxs-lookup"><span data-stu-id="e7f53-259">**nvarchar(** 2078 **)**</span></span>|<span data-ttu-id="e7f53-260">Nombres de las columnas en las que se ha generado el índice.</span><span class="sxs-lookup"><span data-stu-id="e7f53-260">Column names on which the index is built.</span></span> <span data-ttu-id="e7f53-261">Devuelve NULL para los índices de almacén de columnas optimizados de memoria xVelocity.</span><span class="sxs-lookup"><span data-stu-id="e7f53-261">Returns NULL for xVelocity memory optimized columnstore indexes.</span></span>|  

-   <span data-ttu-id="e7f53-262">Conjunto de resultados adicional devuelto en las restricciones:</span><span class="sxs-lookup"><span data-stu-id="e7f53-262">Additional result set returned on constraints:</span></span>  

    |<span data-ttu-id="e7f53-263">Nombre de columna</span><span class="sxs-lookup"><span data-stu-id="e7f53-263">Column name</span></span>|<span data-ttu-id="e7f53-264">Tipo de datos</span><span class="sxs-lookup"><span data-stu-id="e7f53-264">Data type</span></span>|<span data-ttu-id="e7f53-265">Descripción</span><span class="sxs-lookup"><span data-stu-id="e7f53-265">Description</span></span>|  
    |-----------------|---------------|-----------------|  
    |<span data-ttu-id="e7f53-266">**constraint_type**</span><span class="sxs-lookup"><span data-stu-id="e7f53-266">**constraint_type**</span></span>|<span data-ttu-id="e7f53-267">**nvarchar(** 146 **)**</span><span class="sxs-lookup"><span data-stu-id="e7f53-267">**nvarchar(** 146 **)**</span></span>|<span data-ttu-id="e7f53-268">Tipo de restricción.</span><span class="sxs-lookup"><span data-stu-id="e7f53-268">Type of constraint.</span></span>|  
    |<span data-ttu-id="e7f53-269">**constraint_name**</span><span class="sxs-lookup"><span data-stu-id="e7f53-269">**constraint_name**</span></span>|<span data-ttu-id="e7f53-270">**nvarchar(** 128 **)**</span><span class="sxs-lookup"><span data-stu-id="e7f53-270">**nvarchar(** 128 **)**</span></span>|<span data-ttu-id="e7f53-271">Nombre de la restricción.</span><span class="sxs-lookup"><span data-stu-id="e7f53-271">Name of the constraint.</span></span>|  
    |<span data-ttu-id="e7f53-272">**delete_action**</span><span class="sxs-lookup"><span data-stu-id="e7f53-272">**delete_action**</span></span>|<span data-ttu-id="e7f53-273">**nvarchar(** 9 **)**</span><span class="sxs-lookup"><span data-stu-id="e7f53-273">**nvarchar(** 9 **)**</span></span>|<span data-ttu-id="e7f53-274">Indica si la acción DELETE es: NO_ACTION, CASCADE, SET_NULL, SET_DEFAULT o N/A.</span><span class="sxs-lookup"><span data-stu-id="e7f53-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="e7f53-275">Solo se aplica a las restricciones FOREIGN KEY.</span><span class="sxs-lookup"><span data-stu-id="e7f53-275">Only applicable to FOREIGN KEY constraints.</span></span>|  
    |<span data-ttu-id="e7f53-276">**update_action**</span><span class="sxs-lookup"><span data-stu-id="e7f53-276">**update_action**</span></span>|<span data-ttu-id="e7f53-277">**nvarchar(** 9 **)**</span><span class="sxs-lookup"><span data-stu-id="e7f53-277">**nvarchar(** 9 **)**</span></span>|<span data-ttu-id="e7f53-278">Indica si la acción UPDATE es: NO_ACTION, CASCADE, SET_NULL, SET_DEFAULT o N/A.</span><span class="sxs-lookup"><span data-stu-id="e7f53-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="e7f53-279">Solo se aplica a las restricciones FOREIGN KEY.</span><span class="sxs-lookup"><span data-stu-id="e7f53-279">Only applicable to FOREIGN KEY constraints.</span></span>|  
    |<span data-ttu-id="e7f53-280">**status_enabled**</span><span class="sxs-lookup"><span data-stu-id="e7f53-280">**status_enabled**</span></span>|<span data-ttu-id="e7f53-281">**varchar(** 8 **)**</span><span class="sxs-lookup"><span data-stu-id="e7f53-281">**varchar(** 8 **)**</span></span>|<span data-ttu-id="e7f53-282">Indica si la restricción está habilitada: Habilitado, Disabled o N/A.</span><span class="sxs-lookup"><span data-stu-id="e7f53-282">Indicates whether the constraint is enabled: Enabled, Disabled, or N/A.</span></span><br /><br /> <span data-ttu-id="e7f53-283">Solo se aplica a las restricciones CHECK y FOREIGN KEY.</span><span class="sxs-lookup"><span data-stu-id="e7f53-283">Only applicable to CHECK and FOREIGN KEY constraints.</span></span>|  
    |<span data-ttu-id="e7f53-284">**status_for_replication**</span><span class="sxs-lookup"><span data-stu-id="e7f53-284">**status_for_replication**</span></span>|<span data-ttu-id="e7f53-285">**varchar (** 19 **)**</span><span class="sxs-lookup"><span data-stu-id="e7f53-285">**varchar(** 19 **)**</span></span>|<span data-ttu-id="e7f53-286">Indica si la restricción es para replicación.</span><span class="sxs-lookup"><span data-stu-id="e7f53-286">Indicates whether the constraint is for replication.</span></span><br /><br /> <span data-ttu-id="e7f53-287">Solo se aplica a las restricciones CHECK y FOREIGN KEY.</span><span class="sxs-lookup"><span data-stu-id="e7f53-287">Only applicable to CHECK and FOREIGN KEY constraints.</span></span>|  
    |<span data-ttu-id="e7f53-288">**constraint_keys**</span><span class="sxs-lookup"><span data-stu-id="e7f53-288">**constraint_keys**</span></span>|<span data-ttu-id="e7f53-289">**nvarchar(** 2078 **)**</span><span class="sxs-lookup"><span data-stu-id="e7f53-289">**nvarchar(** 2078 **)**</span></span>|<span data-ttu-id="e7f53-290">Nombres de las columnas que componen la restricción o, en el caso de valores predeterminados y reglas, el texto que define el valor predeterminado o la regla.</span><span class="sxs-lookup"><span data-stu-id="e7f53-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="e7f53-291">Conjunto de resultados adicional devuelto en los objetos de referencia:</span><span class="sxs-lookup"><span data-stu-id="e7f53-291">Additional result set returned on referencing objects:</span></span>  

    |<span data-ttu-id="e7f53-292">Nombre de columna</span><span class="sxs-lookup"><span data-stu-id="e7f53-292">Column name</span></span>|<span data-ttu-id="e7f53-293">Tipo de datos</span><span class="sxs-lookup"><span data-stu-id="e7f53-293">Data type</span></span>|<span data-ttu-id="e7f53-294">Descripción</span><span class="sxs-lookup"><span data-stu-id="e7f53-294">Description</span></span>|  
    |-----------------|---------------|-----------------|  
    |<span data-ttu-id="e7f53-295">**Tabla hace referencia**</span><span class="sxs-lookup"><span data-stu-id="e7f53-295">**Table is referenced by**</span></span>|<span data-ttu-id="e7f53-296">**nvarchar(** 516 **)**</span><span class="sxs-lookup"><span data-stu-id="e7f53-296">**nvarchar(** 516 **)**</span></span>|<span data-ttu-id="e7f53-297">Identifica otros objetos de base de datos que hacen referencia a la tabla.</span><span class="sxs-lookup"><span data-stu-id="e7f53-297">Identifies other database objects that reference the table.</span></span>|  

-   <span data-ttu-id="e7f53-298">Conjunto de resultados adicional devuelto en los procedimientos almacenados, las funciones o los procedimientos almacenados extendidos.</span><span class="sxs-lookup"><span data-stu-id="e7f53-298">Additional result set returned on stored procedures, functions, or extended stored procedures.</span></span>  

    |<span data-ttu-id="e7f53-299">Nombre de columna</span><span class="sxs-lookup"><span data-stu-id="e7f53-299">Column name</span></span>|<span data-ttu-id="e7f53-300">Tipo de datos</span><span class="sxs-lookup"><span data-stu-id="e7f53-300">Data type</span></span>|<span data-ttu-id="e7f53-301">Descripción</span><span class="sxs-lookup"><span data-stu-id="e7f53-301">Description</span></span>|  
    |-----------------|---------------|-----------------|  
    |<span data-ttu-id="e7f53-302">**Nombre de parámetro**</span><span class="sxs-lookup"><span data-stu-id="e7f53-302">**Parameter_name**</span></span>|<span data-ttu-id="e7f53-303">**nvarchar(** 128 **)**</span><span class="sxs-lookup"><span data-stu-id="e7f53-303">**nvarchar(** 128 **)**</span></span>|<span data-ttu-id="e7f53-304">Nombre del parámetro del procedimiento almacenado.</span><span class="sxs-lookup"><span data-stu-id="e7f53-304">Stored procedure parameter name.</span></span>|  
    |<span data-ttu-id="e7f53-305">**Tipo**</span><span class="sxs-lookup"><span data-stu-id="e7f53-305">**Type**</span></span>|<span data-ttu-id="e7f53-306">**nvarchar(** 128 **)**</span><span class="sxs-lookup"><span data-stu-id="e7f53-306">**nvarchar(** 128 **)**</span></span>|<span data-ttu-id="e7f53-307">Tipo de datos del parámetro del procedimiento almacenado.</span><span class="sxs-lookup"><span data-stu-id="e7f53-307">Data type of the stored procedure parameter.</span></span>|  
    |<span data-ttu-id="e7f53-308">**Longitud**</span><span class="sxs-lookup"><span data-stu-id="e7f53-308">**Length**</span></span>|<span data-ttu-id="e7f53-309">**smallint**</span><span class="sxs-lookup"><span data-stu-id="e7f53-309">**smallint**</span></span>|<span data-ttu-id="e7f53-310">Longitud máxima de almacenamiento físico en bytes.</span><span class="sxs-lookup"><span data-stu-id="e7f53-310">Maximum physical storage length, in bytes.</span></span>|  
    |<span data-ttu-id="e7f53-311">**Prec**</span><span class="sxs-lookup"><span data-stu-id="e7f53-311">**Prec**</span></span>|<span data-ttu-id="e7f53-312">**int**</span><span class="sxs-lookup"><span data-stu-id="e7f53-312">**int**</span></span>|<span data-ttu-id="e7f53-313">Precisión o número total de dígitos.</span><span class="sxs-lookup"><span data-stu-id="e7f53-313">Precision or total number of digits.</span></span>|  
    |<span data-ttu-id="e7f53-314">**Escala**</span><span class="sxs-lookup"><span data-stu-id="e7f53-314">**Scale**</span></span>|<span data-ttu-id="e7f53-315">**int**</span><span class="sxs-lookup"><span data-stu-id="e7f53-315">**int**</span></span>|<span data-ttu-id="e7f53-316">Número de dígitos a la derecha del separador decimal.</span><span class="sxs-lookup"><span data-stu-id="e7f53-316">Number of digits to the right of the decimal point.</span></span>|  
    |<span data-ttu-id="e7f53-317">**Param_order**</span><span class="sxs-lookup"><span data-stu-id="e7f53-317">**Param_order**</span></span>|<span data-ttu-id="e7f53-318">**smallint**</span><span class="sxs-lookup"><span data-stu-id="e7f53-318">**smallint**</span></span>|<span data-ttu-id="e7f53-319">Orden del parámetro.</span><span class="sxs-lookup"><span data-stu-id="e7f53-319">Order of the parameter.</span></span>|  

ComentariosRemarks

El sp_help procedimiento busca un objeto solo la base de datos actual.The sp_help procedure looks for an object in the current database only.

Cuando nombre no se especifica, sp_help listas objeto nombres, propietarios y tipos de objeto para todos los objetos de la base de datos actual.When name is not specified, sp_help lists object names, owners, and object types for all objects in the current database. sp_helptrigger proporciona información acerca de los desencadenadores.sp_helptrigger provides information about triggers.

sp_help expone solo las columnas de índice ordenable; por lo tanto, no expone información sobre los índices XML o índices espaciales.sp_help exposes only orderable index columns; therefore, it does not expose information about XML indexes or spatial indexes.

PermisosPermissions

Debe pertenecer al rol public .Requires membership in the public role. El usuario debe tener al menos un permiso objname.The user must have at least one permission on objname. Para ver claves de restricción de columna, valores predeterminados o reglas, debe tener el permiso VIEW DEFINITION en la tabla.To view column constraint keys, defaults, or rules, you must have VIEW DEFINITION permission on the table.

EjemplosExamples

A.A. Devolver información acerca de todos los objetosReturning information about all objects

En el siguiente ejemplo se presenta información acerca de cada objeto de la base de datos master.The following example lists information about each object in the master database.

USE master;  
GO  
EXEC sp_help;  
GO  

b.B. Devolver información acerca de un solo objetoReturning information about a single object

En el siguiente ejemplo se presenta información acerca de la tabla Person.The following example displays information about the Person table.

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

Vea tambiénSee Also

Procedimientos almacenados del motor de base de datos (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)
Procedimientos almacenados del sistema (Transact-SQL) System Stored Procedures (Transact-SQL)
sys.sysobjects (Transact-SQL)sys.sysobjects (Transact-SQL)