sp_syntax

Description

Displays the syntax of Transact-SQL statements, system procedures, utilities, and other routines for Adaptive Server, depending on which products and corresponding sp_syntax scripts exist on your server.

Syntax

sp_syntax word [, mod][, language]

Parameters

word

is the name or partial name of a command or routine; for example, “help”, to list all system procedures providing help. To include spaces or Transact-SQL reserved words, enclose the word in quotes.

mod

is the name or partial name of one of the modules such as “Transact-SQL” or “Utility”. Each sp_syntax installation script adds different modules. Use sp_syntax without any parameters to see which modules exist on your server.

language

is the language of the syntax description to be retrieved. language must be a valid language name in the syslanguages table.

Examples

Example 1

Displays all sp_syntax modules available on your server:

sp_syntax
sp_syntax provides syntax help for Sybase products.
These modules are installed on this Server:


Module               
-------------------- 
Transact-SQL         
UNIX Utility         
System Procedure     

Usage: sp_syntax command [, module [, language]]

Example 2

Displays the syntax and functional description of all routines containing the word or word fragment “disk”. Since “disk” is a Transact-SQL reserved word, enclose it in quotes:

sp_syntax "disk"

Usage

Permissions

Any user can execute sp_syntax. Permission checks do not differ based on the granular permissions settings.

Auditing

Values in event and extrainfo columns from the sysaudits table are:

Event

Audit option

Command or access audited

Information in extrainfo

38

exec_procedure

Execution of a procedure

  • Roles – Current active roles

  • Keywords or options – NULL

  • Previous value – NULL

  • Current value – NULL

  • Other information – All input parameters

  • Proxy information – Original login name, if set proxy in effect

Tables used

sybsyntax..sybsyntax

See also

System procedures sp_helpdb