ORA-12899: value too large for column "SCHEMA"."TABLE"."COLUMN" (actual: N, maximum: M)
A value is longer than the column allows. The message shows the actual and maximum length. With multi-byte data, a column sized in BYTE can overflow even when the text looks short enough — Turkish letters such as ğ, ş and ı take two bytes in AL32UTF8.
What it means
Every VARCHAR2 and CHAR column has a maximum length, in bytes or in characters. When an INSERT or UPDATE would exceed it, Oracle rejects the statement and reports both lengths, e.g. (actual: 23, maximum: 20). If the length is in BYTE and the database character set is AL32UTF8, every non-ASCII character counts as two or more bytes.
Common causes
- The incoming value is simply longer than the column.
- Byte length semantics with multi-byte characters:
VARCHAR2(20)holds 20 bytes, which may be fewer than 20 characters. - Data migrated from a single-byte character set to AL32UTF8.
- An application that does not validate input length.
How to fix it
- Compare the actual and maximum values in the message to see how much is missing.
- Enlarge the column, preferably with character semantics:
ALTER TABLE t MODIFY (col VARCHAR2(50 CHAR)). - Check lengths in bytes and characters:
LENGTHB(col)vsLENGTH(col). - Validate or truncate input in the application if the limit is intentional.
Example
Bytes vs characters (AL32UTF8):
SELECT LENGTH('Gümüşhane') AS chars, LENGTHB('Gümüşhane') AS bytes FROM dual;
-- chars = 9, bytes = 12
Size the column in characters:
ALTER TABLE customers MODIFY (city VARCHAR2(50 CHAR));
In SQLlightspeed
When a statement fails, SQLlightspeed’s error panel shows the error code with a plain-language explanation and a suggestion for what to do next, together with Oracle’s own message and a link to Oracle’s documentation — for this error and dozens of other common ones.
Related errors
ORA-06502ORA-01400ORA-01722 All Oracle errors →
Oracle documentation for ORA-12899. Oracle is a registered trademark of Oracle Corporation. SQLlightspeed is not affiliated with Oracle.