In SESAM/SQL there are words that are reserved as keywords for SQL and utility statements. These keywords cannot be used as the names of views, tables, columns, etc. in SQL or utility statements or when working with the utility monitor, unless you specify the keyword in the form of a special name.
The synonym processing feature provided by the ESQL precompiler is a convenient way of replacing keywords or of redefining names.
You can use the precompiler option SOURCE-PROPERTIES to set the ESQL-DIALECT parameter to ISO, OLD or ALL-FEATURES. This determines whether the SQL dialect ISO, OLD or FILL has to be used.
The table below lists the reserved keywords and indicates the SQL dialect in which they are valid.
Keyword | ISO | OLD | FULL |
ABS | X | X | |
ABSOLUTE | X | X | |
ACTION | X | X | |
ADD | X | X | |
ALL | X | X | X |
ALLOCATE | X | X | |
ALTER | X | X | |
AND | X | X | X |
ANY | X | X | X |
ARE | X | X | |
AS | X | X | X |
ASC | X | X | X |
ASSERTION | X | X | |
AT | X | X | |
AUTHORIZATION | X | X | X |
AVG | X | X | X |
BEGIN | X | X | X |
BETWEEN | X | X | X |
BIT | X | X | |
BIT_LENGTH | X | X | |
BLOB | X | X | |
BOTH | X | X | |
BY | X | X | X |
CALL | X | X | |
CASCADE | X | X | |
CASCADED | X | X | |
CASE | X | X | |
CAST | X | X | |
CATALOG | X | X | |
CEIL | X | X | |
CEILING | X | X | |
CHAR | X | X | X |
CHARACTER | X | X | X |
CHARACTER_LENGTH | X | X | |
CHAR_LENGTH | X | X | |
CHECK | X | X | X |
CLOSE | X | X | X |
COALESCE | X | X | |
COLLATE | X | X | |
COLLATION | X | X | |
COLUMN | X | X | |
COMMIT | X | X | X |
CONNECT | X | X | |
CONNECTION | X | X | |
CONSTRAINT | X | X | |
CONSTRAINTS | X | X | |
CONTINUE | X | X | X |
CONVERT | X | X | |
COPY | X | ||
CORRESPONDING | X | X | |
COUNT | X | X | X |
CREATE | X | X | X |
CROSS | X | X | |
CURRENT | X | X | X |
CURRENT_CATALOG | X | X | |
CURRENT_DATE | X | X | |
CURRENT_ISOLATION_LEVEL | X | ||
CURRENT_REFERENCED_CATALOG | X | ||
CURRENT_SCHEMA | X | X | |
CURRENT_TIME | X | X | |
CURRENT_TIMESTAMP | X | X | |
CURRENT_USER | X | X | |
CURSOR | X | X | X |
DATA | X | X | |
DATE | X | X | |
DATE_OF_JULIAN_DAY | X | ||
DAY | X | X | |
DEALLOCATE | X | X | |
DEC | X | X | X |
DECIMAL | X | X | X |
DECLARE | X | X | X |
DECRYPT | X | ||
DEFAULT | X | X | X |
DEFERRABLE | X | X | |
DEFERRED | X | X | |
DELETE | X | X | X |
DESC | X | X | X |
DESCRIBE | X | X | |
DESCRIPTOR | X | X | |
DIAGNOSTICS | X | X | |
DIRECTORY | X | ||
DISCONNECT | X | X | |
DISTINCT | X | X | X |
DOMAIN | X | X | |
DOUBLE | X | X | X |
DROP | X | X | |
ELSE | X | X | |
ENCRYPT | X | ||
END | X | X | X |
END-EXEC | X | ||
ESCAPE | X | X | X |
EXCEPT | X | X | |
EXCEPTION | X | X | |
EXEC | X | X | X |
EXECUTE | X | X | X |
EXISTS | X | X | X |
EXP | X | X | |
EXPORT | X | ||
EXTERNAL | X | X | |
EXTRACT | X | X | |
FALSE | X | X | |
FETCH | X | X | X |
FIRST | X | X | X |
FLOAT | X | X | X |
FLOOR | X | X | |
FOR | X | X | X |
FORCED | X | ||
FOREIGN | X | X | X |
FOUND | X | X | X |
FROM | X | X | X |
FULL | X | X | |
GET | X | X | |
GLOBAL | X | X | |
GO | X | X | X |
GOTO | X | X | X |
GRANT | X | X | X |
GROUP | X | X | X |
HAVING | X | X | X |
HEX_OF_VALUE | X | ||
HOLD | X | X | |
HOUR | X | X | |
IDENTITY | X | X | |
IMMEDIATE | X | X | X |
IMPORT | X | ||
IN | X | X | X |
INDICATOR | X | X | X |
INITIALLY | X | X | |
INNER | X | X | |
INPUT | X | X | |
INSERT | X | X | X |
INT | X | X | X |
INTEGER | X | X | X |
INTERSECT | X | X | |
INTERVAL | X | X | |
INTO | X | X | X |
IS | X | X | X |
ISOLATION | X | X | |
JOIN | X | X | |
JULIAN_DAY_OF_DATE | X | ||
KEY | X | X | X |
LANGUAGE | X | X | X |
LAST | X | X | X |
LEADING | X | X | |
LEFT | X | X | |
LEVEL | X | X | X |
LIKE | X | X | X |
LIKE_REGEX | X | X | |
LN | X | X | |
LOAD | X | ||
LOCAL | X | X | |
LOCALTIME | X | X | |
LOCALTIMESTAMP | X | X | |
LOWER | X | X | |
MATCH | X | X | |
MATCHED | X | X | |
MAX | X | X | X |
MERGE | X | X | |
MIGRATE | X | ||
MIN | X | X | X |
MINUTE | X | X | |
MOD | X | X | |
MODIFY | X | ||
MODULE | X | X | X |
MONTH | X | X | |
NAMES | X | X | |
NATIONAL | X | X | |
NATURAL | X | X | |
NCHAR | X | X | |
NEW | X | X | |
NEXT | X | X | X |
NO | X | X | |
NORMALIZE | X | X | |
NOT | X | X | X |
NULL | X | X | X |
NULLIF | X | X | |
NUMERIC | X | X | X |
NVARCHAR | X | ||
OCTET_LENGTH | X | X | |
OF | X | X | X |
OLD | X | X | |
ON | X | X | X |
ONLY | X | X | X |
OPEN | X | X | X |
OPTION | X | X | X |
OR | X | X | X |
ORDER | X | X | X |
OUTER | X | X | |
OUTPUT | X | X | |
OVERLAPS | X | X | |
PARTIAL | X | X | |
PERMIT | X | X | |
POSITION | X | X | |
POWER | X | X | |
PRECISION | X | X | X |
PREPARE | X | X | X |
PRESERVE | X | X | |
PRIMARY | X | X | X |
PRIOR | X | X | X |
PRIVILEGES | X | X | X |
PROCEDURE | X | X | X |
PUBLIC | X | X | X |
READ | X | X | X |
REAL | X | X | X |
RECOVER | X | ||
REF | X | X | |
REFERENCES | X | X | X |
REFRESH | X | ||
RELATIVE | X | X | |
REORG | X | ||
REP_OF_VALUE | X | ||
RESTORE | X | X | |
RESTRICT | X | X | |
RETURN | X | X | X |
REVOKE | X | X | |
RIGHT | X | X | |
ROLLBACK | X | X | X |
ROWS | X | X | |
SCHEMA | X | X | X |
SCOPE | X | X | |
SCROLL | X | X | X |
SECOND | X | X | |
SECTION | X | X | X |
SELECT | X | X | X |
SESSION | X | X | |
SESSION_USER | X | X | |
SET | X | X | X |
SIGN | X | ||
SIZE | X | X | |
SMALLINT | X | X | X |
SOME | X | X | X |
SORTED | X | ||
SQL | X | X | X |
SQLCODE | X | X | |
SQLERROR | X | X | X |
SQLSTATE | X | X | |
SQRT | X | X | |
STORE | X | X | |
SUBSTRING | X | X | |
SUM | X | X | X |
SYSTEM | X | X | |
SYSTEM_USER | X | X | |
TABLE | X | X | X |
TEMPORARY | X | X | X |
THEN | X | X | |
TIME | X | X | |
TIMESTAMP | X | X | |
TIMEZONE_HOUR | X | X | |
TIMEZONE_MINUTE | X | X | |
TO | X | X | X |
TRAILING | X | X | |
TRANSACTION | X | X | X |
TRANSLATE | X | X | |
TRANSLATION | X | X | |
TRIM | X | X | |
TRUE | X | X | |
TRUNC | X | ||
UESCAPE | X | X | |
UNION | X | X | X |
UNIQUE | X | X | X |
UNKNOWN | X | X | |
UNLOAD | X | ||
UPDATE | X | X | X |
UPPER | X | X | |
USAGE | X | X | |
USER | X | X | X |
USING | X | X | X |
VALUE | X | X | |
VALUES | X | X | X |
VALUE_OF_HEX | X | ||
VALUE_OF_REP | X | ||
VARCHAR | X | X | |
VARYING | X | X | |
VIEW | X | X | X |
WHEN | X | X | |
WHENEVER | X | X | X |
WHERE | X | X | X |
WITH | X | X | X |
WITHOUT | X | X | |
WORK | X | X | X |
WRITE | X | X | X |
YEAR | X | X | |
ZONE | X | X |
Table 142: SESAM/SQL keywords