> ## Documentation Index
> Fetch the complete documentation index at: /documents/llms.txt
> Use this file to discover all available pages before exploring further.

# Keywords

> Reference list of reserved and non-reserved keywords in the database SQL.

This topic describes non-reserved keywords and reserved keywords. It provides a list of reserved keywords in the database.

## Introduction

Keywords in SQL statements, such as `CREATE` and `DROP`, have special meanings when parsed by the database. Keywords are classified into non-reserved keywords and reserved keywords.

* **Non-reserved keywords** can be directly used as identifiers without special treatment, such as table names and column names. For example, `DB` is a non-reserved keyword. You can create a database named `DB`.

  ```SQL theme={null}
  CREATE DATABASE DB;
  Query OK, 0 rows affected (0.00 sec)
  ```

* **Reserved keywords** can be used as identifiers only after special treatment. For example, `LIKE` is a reserved keyword. If you want to use it to identify a database, enclose it in a pair of backticks (\`).

  ```SQL theme={null}
  CREATE DATABASE `LIKE`;
  Query OK, 0 rows affected (0.01 sec)
  ```

  If it is not enclosed in backticks, an error is returned:

  ```SQL theme={null}
  CREATE DATABASE LIKE;
  ERROR 1064 (HY000): Getting syntax error at line 1, column 16. Detail message: Unexpected input 'like', the most similar input is {a legal identifier}.
  ```

## Reserved keywords

Following are the database reserved keywords arranged in alphabetical order. You must enclose them in a pair of backticks (\`) if you want to use them as identifiers. The reserved keywords may vary with versions.

### A

* ADD
* ALL
* ALTER
* ANALYZE
* AND
* ARRAY
* AS
* ASC

### B

* BETWEEN
* BIGINT
* BITMAP
* BOTH
* BY

### C

* CASE
* CHAR
* CHARACTER
* CHECK
* COLLATE
* COLUMN
* COMPACTION (v3.1 and later)
* CONVERT
* CREATE
* CROSS
* CUBE
* CURRENT\_DATE
* CURRENT\_TIME
* CURRENT\_TIMESTAMP
* CURRENT\_USER
* CURRENT\_ROLE (v3.0 and later)

### D

* DATABASE
* DATABASES
* DECIMAL
* DECIMALV2
* DECIMAL32
* DECIMAL64
* DECIMAL128
* DEFAULT
* DELETE
* DENSE\_RANK
* DESC
* DESCRIBE
* DISTINCT
* DOUBLE
* DROP
* DUAL
* DEFERRED (v3.0 and later)

### E

* ELSE
* EXCEPT
* EXCLUDE
* EXISTS
* EXPLAIN

### F

* FALSE
* FIRST\_VALUE
* FLOAT
* FOR
* FORCE
* FROM
* FULL
* FUNCTION

### G

* GRANT
* GROUP
* GROUPS
* GROUPING
* GROUPING\_ID

### H

* HAVING
* HLL
* HOST

### I

* IF
* IGNORE
* IN
* INDEX
* INFILE
* INNER
* INSERT
* INT
* INTEGER
* INTERSECT
* INTO
* IS
* IMMEDIATE (v3.0 and later)

### J

* JOIN
* JSON

### K

* KEY
* KEYS
* KILL

### L

* LAG
* LARGEINT
* LAST\_VALUE
* LATERAL
* LEAD
* LEFT
* LIKE
* LIMIT
* LOAD
* LOCALTIME
* LOCALTIMESTAMP

### M

* MAXVALUE
* MINUS
* MOD

### N

* NTILE
* NOT
* NULL

### O

* ON
* OR
* ORDER
* OUTER
* OUTFILE
* OVER

### P

* PARTITION
* PERCENTILE
* PRIMARY
* PROCEDURE

### Q

* QUALIFY

### R

* RANGE
* RANK
* READ
* REGEXP
* RELEASE
* RENAME
* REPLACE
* REVOKE
* RIGHT
* RLIKE
* ROW
* ROWS
* ROW\_NUMBER

### S

* SCHEMA
* SCHEMAS
* SELECT
* SET
* SET\_VAR
* SHOW
* SMALLINT
* SYSTEM

### T

* TABLE
* TERMINATED
* TEXT (v3.1 and later)
* THEN
* TINYINT
* TO
* TRUE

### U

* UNION
* UNIQUE
* UNSIGNED
* UPDATE
* USE
* USING

### V

* VALUES
* VARCHAR

### W

* WHEN
* WHERE
* WITH


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.