Adriano dos Santos Fernandes
Tracker ticket: #5589
The syntax of character string literals was changed to support the full SQL standard syntax.This means a literal can be “interrupted” by whitespace or a comment.This can be used, for example, to break up a long literal over several lines, or provide inline comments.
<character string literal> ::= [ <introducer> <character set specification> ] <quote> [ <character representation>... ] <quote> [ { <separator> <quote> [ <character representation>... ] <quote> }... ] <separator> ::= { <comment> | <white space> }...
-- whitespace between literal select 'ab' 'cd' from RDB$DATABASE; -- output: 'abcd' -- comment and whitespace between literal select 'ab' /* comment */ 'cd' from RDB$DATABASE; -- output: 'abcd'
Adriano dos Santos Fernandes
Tracker ticket: #5588
The syntax of binary string literals was changed to support the full SQL standard syntax.This means a literal can contain spaces to separate hexadecimal characters, and it can be “interrupted” by whitespace or a comment.This can be used, for example, to make the hex string more readable by grouping characters, or to break up a long literal over several lines, or provide inline comments.
<binary string literal> ::= X <quote> [ <space>... ] [ { <hexit> [ <space>... ] <hexit> [ <space>... ] }... ] <quote> [ { <separator> <quote> [ <space>... ] [ { <hexit> [ <space>... ] <hexit> [ <space>... ] }... ] <quote> }... ]
-- Group per byte (whitespace inside literal) select _win1252 x'42 49 4e 41 52 59' from RDB$DATABASE; -- output: BINARY -- whitespace between literal select _win1252 x'42494e' '415259' from RDB$DATABASE; -- output: BINARY
Note
|
The usage of the |