sp_helpsql System Stored Procedure

Provides syntax for Transact-SQL statements, system procedures, and other special topics.

Syntax

sp_helpsql ['topic']

where

topic
Specifies the topic on which you want help. Help information is available for all Transact-SQL statements, all system procedures, and the following special topics: datatypes, expressions, functions, wildcard characters, mathematical functions, and text functions. You must include quotation marks around topic.

Remarks

Online Help is also available through the SQL Help icon in the SQL Server program group.

You can enter just the first few letters of a topic. If these letters are enough to identify the topic, then Help on the topic is displayed. For example, to get Help on the CREATE TABLE statement, execute the following:

sp_helpsql 'CREATE TAB'

To get help on all topics starting with "CREATE," execute the following:

sp_helpsql 'CREATE'

Examples

A.    Help on a Single Command

This example displays a brief definition of the DISK INIT statement along with its syntax.

sp_helpsql 'disk init'
B.    Help on Functions

This example displays information about SQL Server functions.

sp_helpsql functions

Permission

Execute permission defaults to the public group.