Tokens are the basic syntactical units of SQL. A token is a sequence of one or more characters. A token cannot contain blank characters, unless it is a string constant or a delimited identifier, which may contain blanks.
Tokens are classified as ordinary or delimiter:
1 .1 +2 SELECT E 3
, 'string' "fld1" = .
Spaces: A space is a sequence of one or more blank characters. Tokens other than string constants and delimited identifiers must not include a space. Any token may be followed by a space. Every ordinary token must be followed by a space or a delimiter token if allowed by the syntax.
Comments: SQL comments are either bracketed (introduced by /* and end with */) or simple (introduced by two consecutive hyphens and end with the end of line). Static SQL statements can include host language comments or SQL comments. Comments can be specified wherever a space can be specified, except within a delimiter token or between the keywords EXEC and SQL.
select * from EMPLOYEE where lastname = 'Smith';
is
equivalent, after folding, to: SELECT * FROM EMPLOYEE WHERE LASTNAME = 'Smith';
Multi-byte alphabetic letters are not folded to uppercase. Single-byte characters (a to z) are folded to uppercase.