6.1.1 Rules for writing SQL statements
- Organization of this subsection
(1) Specifying the order of options
Specify options in the order in which they are described in the specification format of each SQL statement.
(2) Specifying keywords
A word specified to use a function, such as the name of an SQL statement (SELECT, UPDATE, etc.), is called a keyword. Most keywords are registered as reserved words in the system and cannot be specified in any other position.
However, keywords that are not registered as reserved words can be used as names. Examples of keywords and names are shown in the following figure.
|
|
For details on names, see 6.1.4 Specifying names.
For details on reserved words, see 6.10 Reserved words.
(3) Specifying numeric values
In SQL statements, specify numeric values that are not numeric literals using the conventions and restrictions of unsigned integers. The following are numeric values that are not numeric literals:
-
Percentage of unused area (percentage of unused area in table and index definitions)
-
Length, maximum length (length and maximum length of character string data and binary data)
-
Precision (number of digits for decimal data)
-
Scaling (number of digits to the right of the decimal point for decimal data)
-
Fractional seconds precision (number of digits in the fractional seconds of time data and time stamp data)
(4) Maximum size of an SQL statement
The maximum size of an SQL statement is 16,000,000 bytes.
For a view definition (CREATE VIEW statement), the maximum size is 64,000 bytes.