FCC form 477 part II and V issues, RT13057
[freeside.git] / etc / sql-reserved-words.txt
1 From http://epoch.cs.berkeley.edu:8000/sequoia/dba/montage/FAQ/SQL.html
2   by Jean Anderson (jta@postgres.berkeley.edu)
3
4 What are the SQL reserved words? 
5
6 I grep'd the following list out of the sql docs available via anonymous ftp to speckle.ncsl.nist.gov:/isowg3.
7 SQL3 words are not set in stone, but you'd do well to avoid them. 
8
9     From sql1992.txt:
10
11          AFTER, ALIAS, ASYNC, BEFORE, BOOLEAN, BREADTH,
12          COMPLETION, CALL, CYCLE, DATA, DEPTH, DICTIONARY, EACH, ELSEIF,
13          EQUALS, GENERAL, IF, IGNORE, LEAVE, LESS, LIMIT, LOOP, MODIFY,
14          NEW, NONE, OBJECT, OFF, OID, OLD, OPERATION, OPERATORS, OTHERS,
15          PARAMETERS, PENDANT, PREORDER, PRIVATE, PROTECTED, RECURSIVE, REF,
16          REFERENCING, REPLACE, RESIGNAL, RETURN, RETURNS, ROLE, ROUTINE,
17          ROW, SAVEPOINT, SEARCH, SENSITIVE, SEQUENCE, SIGNAL, SIMILAR,
18          SQLEXCEPTION, SQLWARNING, STRUCTURE, TEST, THERE, TRIGGER, TYPE,
19          UNDER, VARIABLE, VIRTUAL, VISIBLE, WAIT, WHILE, WITHOUT
20
21     From sql1992.txt (Annex E):
22
23          ABSOLUTE, ACTION, ADD, ALLOCATE, ALTER, ARE, ASSERTION, AT, BETWEEN,
24          BIT, BIT
25
26 What are the SQL reserved words? 
27
28 I grep'd the following list out of the sql docs available via anonymous ftp to speckle.ncsl.nist.gov:/isowg3.
29 SQL3 words are not set in stone, but you'd do well to avoid them. 
30
31     From sql1992.txt:
32
33          AFTER, ALIAS, ASYNC, BEFORE, BOOLEAN, BREADTH,
34          COMPLETION, CALL, CYCLE, DATA, DEPTH, DICTIONARY, EACH, ELSEIF,
35          EQUALS, GENERAL, IF, IGNORE, LEAVE, LESS, LIMIT, LOOP, MODIFY,
36          NEW, NONE, OBJECT, OFF, OID, OLD, OPERATION, OPERATORS, OTHERS,
37          PARAMETERS, PENDANT, PREORDER, PRIVATE, PROTECTED, RECURSIVE, REF,
38          REFERENCING, REPLACE, RESIGNAL, RETURN, RETURNS, ROLE, ROUTINE,
39          ROW, SAVEPOINT, SEARCH, SENSITIVE, SEQUENCE, SIGNAL, SIMILAR,
40          SQLEXCEPTION, SQLWARNING, STRUCTURE, TEST, THERE, TRIGGER, TYPE,
41          UNDER, VARIABLE, VIRTUAL, VISIBLE, WAIT, WHILE, WITHOUT
42
43     From sql1992.txt (Annex E):
44
45          ABSOLUTE, ACTION, ADD, ALLOCATE, ALTER, ARE, ASSERTION, AT, BETWEEN,
46          BIT, BIT
47
48 What are the SQL reserved words? 
49
50 I grep'd the following list out of the sql docs available via anonymous ftp to speckle.ncsl.nist.gov:/isowg3.
51 SQL3 words are not set in stone, but you'd do well to avoid them. 
52
53     From sql1992.txt:
54
55          AFTER, ALIAS, ASYNC, BEFORE, BOOLEAN, BREADTH,
56          COMPLETION, CALL, CYCLE, DATA, DEPTH, DICTIONARY, EACH, ELSEIF,
57          EQUALS, GENERAL, IF, IGNORE, LEAVE, LESS, LIMIT, LOOP, MODIFY,
58          NEW, NONE, OBJECT, OFF, OID, OLD, OPERATION, OPERATORS, OTHERS,
59          PARAMETERS, PENDANT, PREORDER, PRIVATE, PROTECTED, RECURSIVE, REF,
60          REFERENCING, REPLACE, RESIGNAL, RETURN, RETURNS, ROLE, ROUTINE,
61          ROW, SAVEPOINT, SEARCH, SENSITIVE, SEQUENCE, SIGNAL, SIMILAR,
62          SQLEXCEPTION, SQLWARNING, STRUCTURE, TEST, THERE, TRIGGER, TYPE,
63          UNDER, VARIABLE, VIRTUAL, VISIBLE, WAIT, WHILE, WITHOUT
64
65     From sql1992.txt (Annex E):
66
67          ABSOLUTE, ACTION, ADD, ALLOCATE, ALTER, ARE, ASSERTION, AT, BETWEEN,
68          BIT, BIT_LENGTH, BOTH, CASCADE, CASCADED, CASE, CAST, CATALOG,
69          CHAR_LENGTH, CHARACTER_LENGTH, COALESCE, COLLATE, COLLATION, COLUMN,
70          CONNECT, CONNECTION, CONSTRAINT, CONSTRAINTS, CONVERT, CORRESPONDING,
71          CROSS, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER,
72          DATE, DAY, DEALLOCATE, DEFERRABLE, DEFERRED, DESCRIBE, DESCRIPTOR,
73          DIAGNOSTICS, DISCONNECT, DOMAIN, DROP, ELSE, END-EXEC, EXCEPT,
74          EXCEPTION, EXECUTE, EXTERNAL, EXTRACT, FALSE, FIRST, FULL, GET,
75          GLOBAL, HOUR, IDENTITY, IMMEDIATE, INITIALLY, INNER, INPUT,
76          INSENSITIVE, INTERSECT, INTERVAL, ISOLATION, JOIN, LAST, LEADING,
77          LEFT, LEVEL, LOCAL, LOWER, MATCH, MINUTE, MONTH, NAMES, NATIONAL,
78          NATURAL, NCHAR, NEXT, NO, NULLIF, OCTET_LENGTH, ONLY, OUTER, OUTPUT,
79          OVERLAPS, PAD, PARTIAL, POSITION, PREPARE, PRESERVE, PRIOR, READ,
80          RELATIVE, RESTRICT, REVOKE, RIGHT, ROWS, SCROLL, SECOND, SESSION,
81          SESSION_USER, SIZE, SPACE, SQLSTATE, SUBSTRING, SYSTEM_USER,
82          TEMPORARY, THEN, TIME, TIMESTAMP, TIMEZONE_HOUR, TIMEZONE_MINUTE,
83          TRAILING, TRANSACTION, TRANSLATE, TRANSLATION, TRIM, TRUE, UNKNOWN,
84          UPPER, USAGE, USING, VALUE, VARCHAR, VARYING, WHEN, WRITE, YEAR, ZONE
85
86     From sql3part2.txt (Annex E)
87
88          ACTION, ACTOR, AFTER, ALIAS, ASYNC, ATTRIBUTES, BEFORE, BOOLEAN,
89          BREADTH, COMPLETION, CURRENT_PATH, CYCLE, DATA, DEPTH, DESTROY,
90          DICTIONARY, EACH, ELEMENT, ELSEIF, EQUALS, FACTOR, GENERAL, HOLD,
91          IGNORE, INSTEAD, LESS, LIMIT, LIST, MODIFY, NEW, NEW_TABLE, NO,
92          NONE, OFF, OID, OLD, OLD_TABLE, OPERATION, OPERATOR, OPERATORS,
93          PARAMETERS, PATH, PENDANT, POSTFIX, PREFIX, PREORDER, PRIVATE,
94          PROTECTED, RECURSIVE, REFERENCING, REPLACE, ROLE, ROUTINE, ROW,
95          SAVEPOINT, SEARCH, SENSITIVE, SEQUENCE, SESSION, SIMILAR, SPACE,
96          SQLEXCEPTION, SQLWARNING, START, STATE, STRUCTURE, SYMBOL, TERM,
97          TEST, THERE, TRIGGER, TYPE, UNDER, VARIABLE, VIRTUAL, VISIBLE,
98          WAIT, WITHOUT
99
100     sql3part4.txt (ANNEX E):
101
102          CALL, DO, ELSEIF, EXCEPTION, IF, LEAVE, LOOP, OTHERS, RESIGNAL,
103          RETURN, RETURNS, SIGNAL, TUPLE, WHILE
104
105 from http://dev.mysql.com/doc/refman/5.6/en/reserved-words.html
106
107 ACCESSIBLE      ADD     ALL
108 ALTER   ANALYZE         AND
109 AS      ASC     ASENSITIVE
110 BEFORE  BETWEEN         BIGINT
111 BINARY  BLOB    BOTH
112 BY      CALL    CASCADE
113 CASE    CHANGE  CHAR
114 CHARACTER       CHECK   COLLATE
115 COLUMN  CONDITION       CONSTRAINT
116 CONTINUE        CONVERT         CREATE
117 CROSS   CURRENT_DATE    CURRENT_TIME
118 CURRENT_TIMESTAMP       CURRENT_USER    CURSOR
119 DATABASE        DATABASES       DAY_HOUR
120 DAY_MICROSECOND         DAY_MINUTE      DAY_SECOND
121 DEC     DECIMAL         DECLARE
122 DEFAULT         DELAYED         DELETE
123 DESC    DESCRIBE        DETERMINISTIC
124 DISTINCT        DISTINCTROW     DIV
125 DOUBLE  DROP    DUAL
126 EACH    ELSE    ELSEIF
127 ENCLOSED        ESCAPED         EXISTS
128 EXIT    EXPLAIN         FALSE
129 FETCH   FLOAT   FLOAT4
130 FLOAT8  FOR     FORCE
131 FOREIGN         FROM    FULLTEXT
132 GENERAL         GRANT   GROUP
133 HAVING  HIGH_PRIORITY   HOUR_MICROSECOND
134 HOUR_MINUTE     HOUR_SECOND     IF
135 IGNORE  IGNORE_SERVER_IDS       IN
136 INDEX   INFILE  INNER
137 INOUT   INSENSITIVE     INSERT
138 INT     INT1    INT2
139 INT3    INT4    INT8
140 INTEGER         INTERVAL        INTO
141 IS      ITERATE         JOIN
142 KEY     KEYS    KILL
143 LEADING         LEAVE   LEFT
144 LIKE    LIMIT   LINEAR
145 LINES   LOAD    LOCALTIME
146 LOCALTIMESTAMP  LOCK    LONG
147 LONGBLOB        LONGTEXT        LOOP
148 LOW_PRIORITY    MASTER_HEARTBEAT_PERIOD         MASTER_SSL_VERIFY_SERVER_CERT
149 MATCH   MAXVALUE        MEDIUMBLOB
150 MEDIUMINT       MEDIUMTEXT      MIDDLEINT
151 MINUTE_MICROSECOND      MINUTE_SECOND   MOD
152 MODIFIES        NATURAL         NOT
153 NO_WRITE_TO_BINLOG      NULL    NUMERIC
154 ON      OPTIMIZE        OPTION
155 OPTIONALLY      OR      ORDER
156 OUT     OUTER   OUTFILE
157 PRECISION       PRIMARY         PROCEDURE
158 PURGE   RANGE   READ
159 READS   READ_WRITE      REAL
160 REFERENCES      REGEXP  RELEASE
161 RENAME  REPEAT  REPLACE
162 REQUIRE         RESIGNAL        RESTRICT
163 RETURN  REVOKE  RIGHT
164 RLIKE   SCHEMA  SCHEMAS
165 SECOND_MICROSECOND      SELECT  SENSITIVE
166 SEPARATOR       SET     SHOW
167 SIGNAL  SLOW    SMALLINT
168 SPATIAL         SPECIFIC        SQL
169 SQLEXCEPTION    SQLSTATE        SQLWARNING
170 SQL_BIG_RESULT  SQL_CALC_FOUND_ROWS     SQL_SMALL_RESULT
171 SSL     STARTING        STRAIGHT_JOIN
172 TABLE   TERMINATED      THEN
173 TINYBLOB        TINYINT         TINYTEXT
174 TO      TRAILING        TRIGGER
175 TRUE    UNDO    UNION
176 UNIQUE  UNLOCK  UNSIGNED
177 UPDATE  USAGE   USE
178 USING   UTC_DATE        UTC_TIME
179 UTC_TIMESTAMP   VALUES  VARBINARY
180 VARCHAR         VARCHARACTER    VARYING
181 WHEN    WHERE   WHILE
182 WITH    WRITE   XOR
183 YEAR_MONTH      ZEROFILL         
184
185 The following are new reserved words in MySQL 5.5:
186 GENERAL         IGNORE_SERVER_IDS       MASTER_HEARTBEAT_PERIOD
187 MAXVALUE        RESIGNAL        SIGNAL
188 SLOW             
189
190 MySQL permits some keywords to be used as unquoted identifiers because many people previously used them. Examples are those in the following list:
191
192     *
193
194       ACTION
195     *
196
197       BIT
198     *
199
200       DATE
201     *
202
203       ENUM
204     *
205
206       NO
207     *
208
209       TEXT
210     *
211
212       TIME
213     *
214
215       TIMESTAMP
216