<!-- Licensed to the Apache Software Foundation (ASF) under one -->
<!-- or more contributor license agreements.  See the NOTICE file -->
<!-- distributed with this work for additional information -->
<!-- regarding copyright ownership.  The ASF licenses this file -->
<!-- to you under the Apache License, Version 2.0 (the -->
<!-- "License"); you may not use this file except in compliance -->
<!-- with the License.  You may obtain a copy of the License at -->
<!-- http://www.apache.org/licenses/LICENSE-2.0 -->
<!-- Unless required by applicable law or agreed to in writing, software -->
<!-- distributed under the License is distributed on an "AS IS" BASIS, -->
<!-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -->
<!-- See the License for the specific language governing permissions and -->
<!-- limitations under the License. -->

# Reserved CQL Keywords and Types (Appendices)

<a id="appendix-a"></a>

## Appendix A: CQL Keywords

CQL distinguishes between *reserved* and *non-reserved* keywords.
Reserved keywords cannot be used as an identifier. They are truly reserved
for the language (but one can enclose a reserved keyword by
double-quotes to use it as an identifier). Non-reserved keywords, however,
only have a specific meaning in a certain context but can be used as
identifiers otherwise. The only *raison d’être* of these non-reserved
keywords is convenience: some keyword are non-reserved when it was
always easy for the parser to decide whether they were used as keywords
or not.

| Keyword        | Reserved?   |
|----------------|-------------|
| `ADD`          | yes         |
| `AGGREGATE`    | no          |
| `ALL`          | no          |
| `ALLOW`        | yes         |
| `ALTER`        | yes         |
| `AND`          | yes         |
| `APPLY`        | yes         |
| `AS`           | no          |
| `ASC`          | yes         |
| `ASCII`        | no          |
| `AUTHORIZE`    | yes         |
| `BATCH`        | yes         |
| `BEGIN`        | yes         |
| `BIGINT`       | no          |
| `BLOB`         | no          |
| `BOOLEAN`      | no          |
| `BY`           | yes         |
| `CALLED`       | no          |
| `CLUSTERING`   | no          |
| `COLUMNFAMILY` | yes         |
| `COMPACT`      | no          |
| `CONTAINS`     | no          |
| `COUNT`        | no          |
| `COUNTER`      | no          |
| `CREATE`       | yes         |
| `CUSTOM`       | no          |
| `DATE`         | no          |
| `DECIMAL`      | no          |
| `DELETE`       | yes         |
| `DESC`         | yes         |
| `DESCRIBE`     | yes         |
| `DISTINCT`     | no          |
| `DOUBLE`       | no          |
| `DROP`         | yes         |
| `ENTRIES`      | yes         |
| `EXECUTE`      | yes         |
| `EXISTS`       | no          |
| `FILTERING`    | no          |
| `FINALFUNC`    | no          |
| `FLOAT`        | no          |
| `FROM`         | yes         |
| `FROZEN`       | no          |
| `FULL`         | yes         |
| `FUNCTION`     | no          |
| `FUNCTIONS`    | no          |
| `GRANT`        | yes         |
| `IF`           | yes         |
| `IN`           | yes         |
| `INDEX`        | yes         |
| `INET`         | no          |
| `INFINITY`     | yes         |
| `INITCOND`     | no          |
| `INPUT`        | no          |
| `INSERT`       | yes         |
| `INT`          | no          |
| `INTO`         | yes         |
| `JSON`         | no          |
| `KEY`          | no          |
| `KEYS`         | no          |
| `KEYSPACE`     | yes         |
| `KEYSPACES`    | no          |
| `LANGUAGE`     | no          |
| `LIMIT`        | yes         |
| `LIST`         | no          |
| `LOGIN`        | no          |
| `MAP`          | no          |
| `MODIFY`       | yes         |
| `NAN`          | yes         |
| `NOLOGIN`      | no          |
| `NORECURSIVE`  | yes         |
| `NOSUPERUSER`  | no          |
| `NOT`          | yes         |
| `NULL`         | yes         |
| `OF`           | yes         |
| `ON`           | yes         |
| `OPTIONS`      | no          |
| `OR`           | yes         |
| `ORDER`        | yes         |
| `PASSWORD`     | no          |
| `PERMISSION`   | no          |
| `PERMISSIONS`  | no          |
| `PRIMARY`      | yes         |
| `RENAME`       | yes         |
| `REPLACE`      | yes         |
| `RETURNS`      | no          |
| `REVOKE`       | yes         |
| `ROLE`         | no          |
| `ROLES`        | no          |
| `SCHEMA`       | yes         |
| `SELECT`       | yes         |
| `SET`          | yes         |
| `SFUNC`        | no          |
| `SMALLINT`     | no          |
| `STATIC`       | no          |
| `STORAGE`      | no          |
| `STYPE`        | no          |
| `SUPERUSER`    | no          |
| `TABLE`        | yes         |
| `TEXT`         | no          |
| `TIME`         | no          |
| `TIMESTAMP`    | no          |
| `TIMEUUID`     | no          |
| `TINYINT`      | no          |
| `TO`           | yes         |
| `TOKEN`        | yes         |
| `TRIGGER`      | no          |
| `TRUNCATE`     | yes         |
| `TTL`          | no          |
| `TUPLE`        | no          |
| `TYPE`         | no          |
| `UNLOGGED`     | yes         |
| `UPDATE`       | yes         |
| `USE`          | yes         |
| `USER`         | no          |
| `USERS`        | no          |
| `USING`        | yes         |
| `UUID`         | no          |
| `VALUES`       | no          |
| `VARCHAR`      | no          |
| `VARINT`       | no          |
| `VECTOR`       | no          |
| `WHERE`        | yes         |
| `WITH`         | yes         |
| `WRITETIME`    | no          |

## Appendix B: CQL Reserved Types

The following type names are not currently used by CQL but are reserved
for potential future use. User-defined types may not use reserved type
names as their name.

| type        |
|-------------|
| `bitstring` |
| `byte`      |
| `complex`   |
| `enum`      |
| `interval`  |
| `macaddr`   |

© 2016, The Apache Software Foundation.

[Apache Cassandra Query Language](https://docs.scylladb.com/manual/master/cql/index.md)
