sp_help System Stored Procedure

Reports information about a database object (any object listed in the sysobjects table) or about a SQL Server - supplied or user-defined datatype.

Syntax

sp_help [objname]

where

objname
Is the name of any object in sysobjects or any user-defined datatype in the systypes table. Database names are not acceptable.

Remarks

The sp_help system stored procedure looks for an object in the current database only.

When no objname parameter is specified, sp_help lists object names, owners, and object types for all objects in the current database.

System procedures do not work on temporary tables because a procedure cannot access a temporary object unless the procedure created the object itself during the current session.

Examples

A.    Help on All Objects

This example lists information about each object in sysobjects.

sp_help
B.    Help on a Single Object

This example displays information about the publishers table.

sp_help publishers

Permission

Execute permission defaults to the public group.

Tables Used

master.dbo.spt_values, syscolumns, sysindexes, sysobjects, systypes

See Also

sp_helpgroup sp_helpsql
sp_helpindex sp_helpuser
sp_helprotect