1.1.4 Insertion of delimiters
(1) Delimiter insertion locations
A delimiter can be inserted at the following locations:
- Between keywords
- Between a keyword and a name
- Between names
- Between a keyword and a numeric value
- Between a name and a numeric value
The following figure shows examples of inserting delimiters.
Figure 1-1 Examples of delimiter insertion
![[Figure]](figure/zu1s0020.gif)
(2) Locations where a delimiter is not allowed
A delimiter cannot be inserted in any of the following locations:
- Within a keyword
- Within a name not enclosed in double quotation marks
- Immediately following the opening double quotation mark enclosing a name
- Immediately before the closing double quotation mark enclosing a name
- Within a numeric literal
- Within an operator
- Between the N and the first single quotation mark (') in N' ...' that represents a national character string literal
- Between the M and the first single quotation mark (') in M' ...' that represents a mixed character string literal
- Between the X and the first single quotation mark (') in X'...' that represents a hexadecimal character string literal
- Between periods in a component specification that is written as ..
The following figure shows examples of locations where delimiters are not allowed.
Figure 1-2 Examples of locations where delimiter is not allowed
![[Figure]](figure/zu1s0030.gif)
(3) Locations where a delimiter is allowed
Delimiters can be inserted in the following locations:
- Before and after any of the following special characters, except as indicated in (2) above:
,, ., -, +, *, ', ", (, ), <, >, =, ^, !, /, ?, :, ;, |, [, ], TAB, NL, CR, space, two-byte space
The following figure shows examples of locations where delimiters can be inserted.
Figure 1-3 Examples of locations where delimiter can be inserted
![[Figure]](figure/zu1s0040.gif)
(4) Comment
In an SQL statement, any characters that appear after a /* and before the first */ that is encountered are treated as a comment. When inserting a comment, observe the following notes:
- /*-*/ marks that are enclosed in double quotation marks (") or single quotation marks (') are not treated as a comment.
- Use of an SQL statement consisting only of a comment can cause an error.
- Comments cannot be nested.
- The /*>>-<<*/ format is treated as an SQL optimization specification. See 2.24 SQL optimization specification.
Examples of specifying a comment are given as follows:
- Correct examples:
CREATE TABLE T1(C1 INT) /* COMMENT */
CREATE /* COMMENT */ TABLE T1(C1 INT)
- Incorrect examples:
SELECT * FROM T1 /* COMMENT
... An error occurs due to the absence of a */ termination symbol.
CREATE TABLE T1 /* COMMENT1 /* COMMENT2 */ COMMENT3 */(C1 INT)
... Nested comments cause an error.