Sunday, November 06, 2011

Maximum Permitted Size of a CHAR Column

The example below, which I ran on an Oracle 9.2.0.7.0 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

SQL>

No comments:

Post a Comment