In Oracle, the VARCHAR2(n) data type stores variable-length character strings up to n bytes (default) or characters with the maximum of 4000 or 32,767 bytes if MAX_STRING_SIZE initialization parameter is set to EXTENDED (not set by default).
In MariaDB Oracle compatibility mode, you can also use VARCHAR2(n) that can store up to 65,535 characters. But effective maximum length is subject to the maximum row size limit of 65,535 bytes (shared among all columns) and the character set used.
Oracle:
CREATE TABLE specs ( note VARCHAR2(30), name VARCHAR2(100 CHAR), item VARCHAR2(50 BYTE) );
MariaDB - Oracle Compatibility:
CREATE TABLE specs ( note VARCHAR2(30), name VARCHAR2(100), -- CHAR length semantics is not supported (this is default) item VARCHAR2(50) -- BYTE length semantics is not supported (length should be adjusted for character set) );
Conversion summary:
For more information, see Oracle to MariaDB Migration - Oracle Compatibility Mode.