Updated on 2024-05-14 GMT+08:00

Keywords

The constraint differences are as follows:

  • In M-compatible mode, keywords are reserved keywords. In MySQL, keywords are non-reserved keywords. In M-compatible mode, keywords cannot be used as table names, column names, column aliases, AS column aliases, AS table aliases, table aliases, function names, or variable names. In MySQL, keywords can be used as these names or aliases.
  • In M-compatible mode, keywords are non-reserved keywords. In MySQL, keywords are reserved keywords. In M-compatible mode, keywords can be used as table names, column names, column aliases, AS column aliases, AS table aliases, table aliases, function names, or variable names. In MySQL, keywords cannot be used as these names or aliases.
  • In M-compatible mode, keywords are reserved keywords (functions or types). In MySQL, keywords are reserved keywords. In M-compatible mode, keywords can be used as column aliases, AS column aliases, function names, or variable names. In MySQL, keywords cannot be used as these names or aliases.
  • In M-compatible mode, keywords are reserved keywords (functions or types). In MySQL, keywords are non-reserved keywords. In M-compatible mode, keywords cannot be used as table aliases, column names, AS table aliases, or table aliases. In MySQL, keywords can be used as these names or aliases.
  • In M-compatible mode, keywords are non-reserved keywords (cannot be functions or types). In MySQL, keywords are reserved keywords. In M-compatible mode, keywords can be used as table aliases, column names, column aliases, AS column aliases, AS table aliases, table aliases, or variable names. In MySQL, keywords cannot be used as these names or aliases.
  • In M-compatible mode, keywords are non-reserved keywords (cannot be functions or types). In MySQL, keywords are non-reserved keywords. In M-compatible mode, keywords cannot be used as function names. In MySQL, keywords can be used as these names or aliases.

    Among non-reserved keywords, reserved keywords (functions or types), and non-reserved keywords (not functions or types) in M-compatible mode, the following keywords cannot be used as column aliases:

    BETWEEN, BIGINT, BLOB, CHAR, CHARACTER, CROSS, DEC, DECIMAL, DIV, DOUBLE, EXISTS, FLOAT, FLOAT4, FLOAT8, GROUPING, INNER, INOUT, INT, INT1, INT2, INT3, INT4, INT8, INTEGER, JOIN, LEFT, LIKE, LONGBLOB, LONGTEXT, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MOD, NATURAL, NUMERIC, OUT, OUTER, PRECISION, REAL, RIGHT, ROW, ROW_NUMBER, SIGNED, SMALLINT, SOUNDS, TINYBLOB, TINYINT, TINYTEXT, VALUES, VARCHAR, VARYING, and WITHOUT.

    SIGNED and WITHOUT can be used as column aliases in MySQL.