How-to Guides‎ > ‎Some crib sheets‎ > ‎

Reserved words in Polyhedra

CL reserved words

The following words have a special meaning to the Polyhedra CL compiler, and cannot be used as the names for classes or attributes defined in CL, nor as local or global variables in CL methods. In addition it is best to avoid their use as column names in a database, if that database is likely to be queried by a CL-coded application, as the queries will have to perform column-renaming games to assign the values to attributes in CL objects.

(the list below was taken from the CL reference manual, section 12.2)

abort add and array as assert at
beep by
case catch char child class commit component constant create
debug default delay delete displayed div divide do
else emit end error exists exit export
false fill for foreach forever forget from function
get global go
if in insert into is item
library line link local locate
me mod multiply
new next not null
object of on or
private public pure
quit
reference remove repeat return rollback root
schema script send set shared sleep sql start step stop subtract switch
target thread priority then throw to transaction true try
unlink until update uses
while with word

Polyhedra SQL reserved words

The following words have special meaning to the Polyhedra SQL engine. If you want to use any of them as the name of a table, column, view, or index, you will have to enclose them in double-quote characters wherever you want to refer to them in SQL statements. (The list was taken from section 3.3 of the Polyhedra SQL reference manual.)

ADD ALL ALTER AND ANY ARRAY AS ASC AUTHORIZATION AVG
BEGIN BETWEEN BINARY BUT BY
CALL CASCADE CHANGE CHAR CHARACTER CHECK CL CLOSE COBOL COMMIT COMPUTED COMPUTING CONDITION CONTINUE CORRESPONDING COUNT CREATE CROSS CURRENT CURSOR
DEC DECIMAL DECLARE DEFAULT DELETE DERIVED DESC DISTINCT DOMAIN DOUBLE DROP
END ESCAPE EVERY EXCEPT EXEC EXECUTE EXISTS
FALSE FETCH FLOAT FOR FOREIGN FORTRAN FOUND FROM FULL
GO GOTO GRANT GROUP
HAVING HIDDEN
IF IN INDEX INDICATOR INNER INSERT INT INTEGER INTERSECT INTO IS
JOIN
KEY
LANGUAGE LARGE LEFT LIKE LIMIT LOAD LOCAL LOCK LOGGED LOGGING
MAX MIN MODIFY MODULE
NATURAL NOT NULL NUMERIC
OBJECT OF OFFSET OLD ON OPEN OPTIMISTIC OPTION OR ORDER ORDERED OUTER
PASCAL PERSISTENT PESSIMISTIC PLI PRECISION PRIMARY PRIVILEGES PROCEDURE PUBLIC PURGING
REAL REFERENCES RENAME RESTRICT REVOKE RIGHT ROLLBACK
SAVE SCHEMA SECTION SELECT SEND SET SHARED SHUTDOWN SMALLINT SOME SQL SQLCODE SQLERROR SUM
TABLE TO TRANSIENT TRUE
UNION UNIQUE UNKNOWN UPDATE USER USING
VALUES VARCHAR VARYING VIEW VIRTUAL
WHENEVER WHERE WITH WITHOUT WORK

(Note that not all of them are used by Polyhedra, but have been added to allow for future expansion, or for compliance with ODBC)

Polyhedra SQL non-reserved words

The following Polyhedra type names are not reserved, but are recognised by the SQL engine by context; this means that it is possible - though not very sensible - to use them as column names, for example. For clarity, if it is best to enclose them in double-quote characters wherever you want to use them in SQL statements other than as type names.

FLOAT32 INTEGER16 INTEGER32 INTEGER32 INTEGER8

Additional words to avoid

SQL-2003 reserved words

This is the complete list of reserved words in SQL-2003.  If you want to use any that are not already reserved words in Polyhedra SQL as the name of a table, column, view, or index, it is good practice to enclose them in double-quote characters wherever you want to refer to them in any SQL statements.

ABS ALL ALLOCATE ALTER AND ANY ARE ARRAY AS ASENSITIVE ASYMMETRIC AT ATOMIC AUTHORIZATION AVG BEGIN BETWEEN BIGINT BINARY BLOB BOOLEAN BOTH BY CALL CALLED CARDINALITY CASCADED CASE CAST CEIL CEILING CHAR CHAR_LENGTH CHARACTER CHARACTER_LENGTH CHECK CLOB CLOSE COALESCE COLLATE COLLECT COLUMN COMMIT CONDITION CONNECT CONSTRAINT CONVERT CORR CORRESPONDING COUNT COVAR_POP COVAR_SAMP CREATE CROSS CUBE CUME_DIST CURRENT CURRENT_DATE CURRENT_DEFAULT_TRANSFORM_GROUP CURRENT_PATH CURRENT_ROLE CURRENT_TIME CURRENT_TIMESTAMP CURRENT_TRANSFORM_GROUP_FOR_TYPE CURRENT_USER CURSOR CYCLE DATE DAY DEALLOCATE DEC DECIMAL DECLARE DEFAULT DELETE DENSE_RANK DEREF DESCRIBE DETERMINISTIC DISCONNECT DISTINCT DOUBLE DROP DYNAMIC EACH ELEMENT ELSE END END_EXEC ESCAPE EVERY EXCEPT EXEC EXECUTE EXISTS EXP EXTERNAL EXTRACT FALSE FETCH FILTER FLOAT FLOOR FOR FOREIGN FREE FROM FULL FUNCTION FUSION GET GLOBAL GRANT GROUP GROUPING HAVING HOLD HOUR IDENTITY IN INDICATOR INNER INOUT INSENSITIVE INSERT INT INTEGER INTERSECT INTERSECTION INTERVAL INTO IS JOIN LANGUAGE LARGE LATERAL LEADING LEFT LIKE LN LOCAL LOCALTIME LOCALTIMESTAMP LOWER MATCH MAX MEMBER MERGE METHOD MIN MINUTE MOD MODIFIES MODULE MONTH MULTISET NATIONAL NATURAL NCHAR NCLOB NEW NO NONE NORMALIZE NOT NULL NULLIF NUMERIC OCTET_LENGTH OF OLD ON ONLY OPEN OR ORDER OUT OUTER OVER OVERLAPS OVERLAY PARAMETER PARTITION PERCENT_RANK PERCENTILE_CONTPERCENTILE_DISC POSITION POWER PRECISION PREPARE PRIMARY PROCEDURE RANGE RANK READS REAL RECURSIVE REF REFERENCES REFERENCING REGR_AVGX REGR_AVGY REGR_COUNT REGR_INTERCEPT REGR_R2 REGR_SLOPE REGR_SXX REGR_SXY REGR_SYY RELEASE RESULT RETURN RETURNS REVOKE RIGHT ROLLBACK ROLLUP ROW ROW_NUMBER ROWS SAVEPOINT SCOPE SCROLL SEARCH SECOND SELECT SENSITIVE SESSION_USER SET SIMILAR SMALLINT SOME SPECIFIC SPECIFICTYPE SQL SQLEXCEPTION SQLSTATE SQLWARNING SQRT START STATIC STDDEV_POP STDDEV_SAMP SUBMULTISET SUBSTRING SUM SYMMETRIC SYSTEM SYSTEM_USER TABLE TABLESAMPLE THEN TIME TIMESTAMP TIMEZONE_HOUR TIMEZONE_MINUTE TO TRAILING TRANSLATE TRANSLATION TREAT TRIGGER TRIM TRUE UESCAPE UNION UNIQUE UNKNOWN UNNEST UPDATE UPPER USER USING VALUE VALUES VAR_POP VAR_SAMP VARCHAR VARYING WHEN WHENEVER WHERE WIDTH_BUCKET WINDOW WITH WITHIN WITHOUT YEAR

SQL_2003 "non-reserved words"

The SQL standard includes many words that are not reserved, but still have special meaning when used in certain contexts. As before, it may be best to enclose them in double-quotes if you are using them as the names of tables, columns, etc.:

A ABSOLUTE ACTION ADA ADD ADMIN AFTER ALWAYS ASCASSERTION ASSIGNMENT ATTRIBUTE ATTRIBUTES
BEFOREBERNOULLI BREADTH
C CASCADE CATALOG CATALOG_NAME CHAINCHARACTER_SET_CATALOG CHARACTER_SET_NAMECHARACTER_SET_SCHEMA CHARACTERISTICS CHARACTERS CLASS_ORIGIN COBOL COLLATION COLLATION_CATALOG COLLATION_NAME COLLATION_SCHEMA COLUMN_NAME COMMAND_FUNCTION COMMAND_FUNCTION_CODE COMMITTED CONDITION_NUMBER CONNECTION CONNECTION_NAME CONSTRAINT_CATALOG CONSTRAINT_NAME CONSTRAINT_SCHEMA CONSTRAINTS CONSTRUCTOR CONTAINS CONTINUE CURSOR_NAME
DATA DATETIME_INTERVAL_CODE DATETIME_INTERVAL_PRECISION DEFAULTS DEFERRABLE DEFERRED DEFINED DEFINER DEGREE DEPTH DERIVED DESC DESCRIPTOR DIAGNOSTICS DISPATCH DOMAIN DYNAMIC_FUNCTION DYNAMIC_FUNCTION_CODE
EQUALS EXCEPTION EXCLUDE EXCLUDING
FINAL FIRST FOLLOWING FORTRAN FOUND
G GENERAL GENERATED GO GOTO GRANTED
HIERARCHY
IMMEDIATE IMPLEMENTATION INCLUDING INCREMENT INITIALLY INPUT INSTANCE INSTANTIABLE INVOKER ISOLATION
K KEY KEY_MEMBER KEY_TYPE
LAST LENGTH LEVEL LOCATOR
M MAP MATCHED MAXVALUE MESSAGE_LENGTH MESSAGE_OCTET_LENGTH MESSAGE_TEXT MINVALUE MORE MUMPS
NAME NAMES NESTING NEXT NORMALIZED NULLABLE NULLS NUMBER
OBJECT OCTETS OPTION OPTIONS ORDERING ORDINALITY OTHERS OUTPUT OVERRIDING
PAD PARAMETER_MODE PARAMETER_NAME PARAMETER_ORDINAL_POSITION PARAMETER_SPECIFIC_CATALOG PARAMETER_SPECIFIC_NAME PARAMETER_SPECIFIC_SCHEMA PARTIAL PASCAL PATH PLACING PLI PRECEDING PRESERVE PRIOR PRIVILEGES PUBLIC
READ RELATIVE REPEATABLE RESTART RESTRICT RETURNED_CARDINALITY RETURNED_LENGTH RETURNED_OCTET_LENGTH RETURNED_SQLSTATE ROLE ROUTINE ROUTINE_CATALOG ROUTINE_NAME ROUTINE_SCHEMA ROW_COUNT
SCALE SCHEMA SCHEMA_NAME SCOPE_CATALOG SCOPE_NAME SCOPE_SCHEMA SECTION SECURITY SELF SEQUENCE SERIALIZABLE SERVER_NAME SESSION SETS SIMPLE SIZE SOURCE SPACE SPECIFIC_NAME STATE STATEMENT STRUCTURE STYLE SUBCLASS_ORIGIN
TABLE_NAME TEMPORARY TIES TOP_LEVEL_COUNT TRANSACTION TRANSACTION_ACTIVE TRANSACTIONS_COMMITTED TRANSACTIONS_ROLLED_BACK TRANSFORM TRANSFORMS TRIGGER_CATALOG TRIGGER_NAME TRIGGER_SCHEMA TYPE
UNBOUNDED UNCOMMITTED UNDER UNNAMED USAGE USER_DEFINED_TYPE_CATALOG USER_DEFINED_TYPE_CODE USER_DEFINED_TYPE_NAME USER_DEFINED_TYPE_SCHEMA
VIEW
WORK WRITE ZONE

C reserved words

auto break case char const continue default do double else enum extern float for goto if int long register return short signed sizeof static struct switch typedef union unsigned void volatile while

C++ reserved words

those of C, plus the following:

asm bool catch class const_cast delete dynamic_cast explicit false friend inline mutable namespace new operator private protected public reinterpret_cast static_cast template this throw true try typeid typename using virtual wchar_t