ApsaraDB RDS for MySQL reserves a small set of keywords beyond those defined by open source MySQL. Avoid using these keywords as identifiers for database objects such as tables, columns, indexes, and user-defined functions (UDFs).
For the full list of keywords reserved by open source MySQL, see the MySQL Reference Manual for your version:
RDS-specific reserved keywords
The following keywords are reserved by ApsaraDB RDS for MySQL in addition to the standard MySQL reserved keywords.
| Engine version | Keyword | Description |
|---|---|---|
| MySQL 8.0, MySQL 5.7 | NEXTVAL | Accesses the next value of a sequence in SQL statements. |
| MySQL 8.0, MySQL 5.7 | CURRVAL | Accesses the current value of a sequence in SQL statements. |
Usage notes
Naming conflicts with UDFs
If a UDF shares the same name as NEXTVAL or CURRVAL, the resolution order depends on the minor engine version of your RDS instance:
Minor engine version 20201031 or earlier: The keyword takes precedence over the UDF.
Minor engine version later than 20201031: The UDF takes precedence over the keyword.