Sunday, November 06, 2011

Maximum Permitted Size of a CHAR Column

The example below, which I ran on an Oracle database, is too trivial to need explanation:

SQL> create table andrew (wide_column char(2000))
  2  /

Table created.

SQL> drop table andrew
  2  /

Table dropped.

SQL> create table andrew (wider_column char(2001))
  2  /
create table andrew (wider_column char(2001))
ERROR at line 1:
ORA-00910: specified length too long for its datatype


No comments:

Post a Comment