I am considering SQL syntax, in particular character string literal .
<character string literal> ::=
[ <introducer> <character set specification> ]
<quote> [ <character representation> ... ] <quote>
[ { <separator> <quote> [ <character representation> ... ] <quote> }... ]
Ignoring the part [ <introducer> <character set specification> ], does this mean one or more <quote> [ <character representation> ... ] <quote>separated by a symbol <separator>?
If so, does this mean that it 'hello' 'world'should be analyzed as one <character string literal>?
For a query, SELECT 'hello' 'world'Microsoft SQL Server 2005 returns:
+-------+
| world |
+-------+
| hello |
+-------+
and MySQL 5.0 returns:
+------------+
| hello |
+------------+
| helloworld |
+------------+
I understand that every taste of SQL is different, and that they do not all follow the standard. I'm just trying to determine if I interpret BNF correctly. Thank.
source
share