Displays documentation for DeltaForge SQL commands, including command listings, descriptions, syntax details, and usage examples.
HELP [COMMANDS]
HELP <command_name>
HELP SYNTAX <command_name>
## Overview HELP provides in-session documentation for all DeltaForge SQL commands. It serves as a built-in reference that is always available without leaving the query editor. ## Behavior The command has three modes: ### HELP COMMANDS Returns a result set listing every registered command with three columns: **command** (the canonical command name), **category** (e.g., DDL, DML, Maintenance, Graph), and **description** (a short summary). This is the full command catalog. ### HELP <command_name> Looks up a single command by name. The lookup is case-insensitive and also checks command aliases. Returns a result set with the command name and its summary description. If no matching command is found, an error is returned. ### HELP SYNTAX <command_name> Returns detailed documentation for a single command. The result set includes four columns: **command**, **syntax** (the full syntax template with parameter placeholders), **description** (extended documentation), and **example** (a runnable SQL example). This mode is useful for understanding parameter options and clause ordering. ### Command Name Matching Command names may span multiple keywords. The parser consumes all keywords and identifiers following HELP (or HELP SYNTAX) until a semicolon or end of input, then joins them with spaces for lookup. For example, `HELP CREATE DELTA TABLE` matches the CREATE DELTA TABLE documentation entry. ## Compatibility HELP is a DeltaForge extension. It is similar in purpose to SQL Server's sp_help and PostgreSQL's \h meta-command, but implemented as a first-class SQL command that returns structured result sets rather than console output.
| Name | Type | Description |
|---|---|---|
command | Command name to get help for. | |
show_syntax | When the SYNTAX keyword precedes the command name, the result includes the full syntax template and an example in addition to the command description. Without SYNTAX, only the summary description is returned. |
-- List all available DeltaForge SQL commands
HELP COMMANDS;
-- Show documentation for the CREATE TABLE command
HELP CREATE TABLE;
-- Show detailed syntax for MERGE
HELP SYNTAX MERGE;
-- Look up a specific command by name
HELP OPTIMIZE;
-- Show syntax for a multi-word command
HELP SYNTAX ALTER TABLE ADD COLUMN;