Returns syntax information for the specified DBCC statement.
DBCC HELP ( 'dbcc_statement' | @dbcc_statement_var | '?' )
dbcc_statement | @dbcc_statement_var
Is the name of the DBCC statement for which to receive syntax information. Provide only the portion of the DBCC statement following the DBCC part of the statement. For example, CHECKDB rather than DBCC CHECKDB.
Specifies that Microsoft® SQL Server™ return all DBCC statements (minus the "DBCC" portion of the statement) for which help information can be obtained.
DBCC HELP returns a result set displaying the syntax for the specified DBCC statement. Syntax varies between the DBCC statements.
DBCC HELP permissions default to members of the sysadmin fixed server role only, and are not transferable.
A. Use DBCC HELP with a variable
This example returns syntax information for DBCC CHECKDB.
DECLARE @dbcc_stmt sysname SET @dbcc_stmt = 'CHECKDB' DBCC HELP (@dbcc_stmt) GO
B. Use DBCC HELP with the ? option
This example returns all DBCC statements for which help is available.
DBCC HELP ('?') GO