1

The following SQL produces this error when tried on SQL Fiddle for an Oracle database.

ORA-01438: value larger than specified precision allowed for this column

CREATE TABLE fruit
(
  cost NUMBER(4,2) NOT NULL
);
INSERT INTO fruit VALUES ('400.00');

Isn't inserting 400.00 allowed, considering that according to the Oracle documentation, that 400.00 is less than 4 digits before the decimal point and two digits after it?

desbest
  • 4,746
  • 11
  • 51
  • 84
  • Not an exact duplicate maybe, but [the answers to this question](http://stackoverflow.com/q/14357816/266304) might explain it. Precision of 4 does not mean four digits before the decimal, unless scale is zero. – Alex Poole Apr 23 '15 at 00:09

0 Answers0