CONNX Data Integration Suite 14.8.0 | Reference Guide | SQL Grammar | Common SQL Grammar Elements
 
Common SQL Grammar Elements
Common elements in SQL Grammar include digits, characters and data types. SQL is composed of a series of lexical units. Each lexical unit consists of a series of characters and/or digits. The precise syntax of these digits, lexical units and tokens is described in the topics of this section.
Character
A character is one unit of a set of symbols, letters, or numbers, collectively called a character set. Common character sets are ASCII (typically used on PCs), and EBCDIC (typically used on mainframes). Characters can either be single byte, or Unicode (two bytes). See discussion of "CHAR vs. NCHAR" under "Data Types".
Examples of characters:
Character
Type
f
single byte ASCII character
5
single byte ASCII character
Q
single byte ASCII character
#
single byte ASCII character
multi-byte Unicode character
Comments
Comments can be inserted within the SQL. Precede the comment with a backslash (/) followed by an asterisk (*). Type the comment. When finished, follow the comment with an asterisk, followed by a backslash. The comment does not execute when the SQL statement is run, but remains within the statement.
Example:
UPDATE customers set customername = "After Merger" WHERE customerid = "ALCAO"
Digit
A digit is a single numeral between zero and nine.