When you work with ESQL, it is useful to know about the special characters that are available, whether ESQL syntax is case sensitive, and how to handle comments.
Symbol | Name | Usage |
---|---|---|
; | semicolon | End of ESQL statement |
. | period | Field reference separator or decimal point |
= | equals | Comparison or assignment |
> | greater than | Comparison |
< | less than | Comparison |
[] | square brackets | Array subscript |
' | single quotation mark | Delimit string, date-time, and decimal literals Note, that to escape a single quotation mark inside a string literal, you must use two single quotation marks. |
|| | double vertical bar | Concatenation |
() | parentheses | Expression delimiter |
" | quotation mark | Identifier delimiter |
* | asterisk | Any name or multiply |
+ | plus | Arithmetic add |
- | minus | Arithmetic subtract, date separator, or negation |
/ | forward slash | Arithmetic divide |
_ | underscore | LIKE single wildcard |
% | percent | LIKE multiple wildcard |
\ | backslash | LIKE escape character |
: | colon | Name space and Time literal separator |
, | comma | List separator |
<> | less than greater than | Not equals |
-- | double minus | ESQL single line comment |
/* */ | slash asterisk asterisk slash | ESQL multiline comment |
? | question mark | Substitution variable in PASSTHRU |
<= | less than or equal | Comparison |
>= | greater than or equal | Comparison |
/*!{ }!*/ | executable comment | Bypass tools check |
ESQL has two types of comment: single line and multiple line. A single line comment starts with the characters -- and ends at the end of the line.
1 - -2
1--2
which is interpreted as the number 1, followed by a line comment.
A multiple line comment starts with /* anywhere in ESQL and ends with */.