Sunday, October 30, 2011

Maximum Permitted Size of a VARCHAR2 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 varchar2(4000))
  2  /

Table created.

SQL> drop table andrew
  2  /

Table dropped.

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

SQL>

No comments:

Post a Comment