Syntax formatting conventions are summarized in the following table. Examples combining these elements follow.
Key |
Definition |
---|---|
variable |
Variables (words standing for values that you fill in) are in italics. |
{ } |
Curly braces mean you must choose at least one of the enclosed options. Do not include braces in the command. |
[ ] |
Brackets mean you may choose or omit enclosed options. Do not include brackets in the command. |
| |
Vertical bars mean you may choose no more than one option (enclosed in braces or brackets). |
, |
Commas mean you may choose as many options as you need (enclosed in braces or brackets). Separate your choices with commas, to be typed as part of the command. Commas may also be required in other syntax contexts. |
( ) |
Parentheses are to be typed as part of the command. |
... |
An ellipsis (three dots) means you may repeat the last unit as many times as you need. Do not include ellipses in the command. |
Curly braces and vertical bars – choose only one option.
{red | yellow | blue}
Curly braces and commas – choose one or more options. If you choose more than one, separate your choices with commas.
{cash, check, credit}
One item in square brackets – choose it or omit it.
[anchovies]
Square brackets and vertical bars – choose none or only one.
[beans | rice | sweet_potatoes]
Square brackets and commas – choose none, one, or more options. If you choose more than one, separate your choices with commas.
[extra_cheese, avocados, sour_cream]
An ellipsis (...) means that you may repeat the last unit as many times as you need. For the alter function replication definition command, for example, you can list one or more parameters and their datatypes for either the add clause or the add searchable parameters clause:
alter function replication definition function_rep_def {deliver as 'proc_name' | add @parameter datatype[, @parameter datatype]... | add searchable parameters @parameter [, @parameter]... | send standby {all | replication definition} parameters}