totn Oracle Error Messages

Oracle / PLSQL: ORA-01723 Error Message

Learn the cause and how to resolve the ORA-01723 error message in Oracle.

Description

When you encounter an ORA-01723 error, the following error message will appear:

  • ORA-01723: zero-length columns are not allowed

Cause

You tried to create a table, but you specified a column as either CHAR(0) or VARCHAR2(0).

Resolution

The option(s) to resolve this Oracle error are:

Option #1

Try modifying your CREATE TABLE statement so that the VARCHAR2 and CHAR columns are at least 1 character in length.

For example, if you tried to create the following table:

CREATE TABLE supplier
( supplier_id numeric(10) not null,
  supplier_name varchar2(50) not null,
  contact_name varchar2(0)
);

You would receive the following error message:

Oracle PLSQL

You could correct this error by defining the contact_name column as a VARCHAR2 column that is at least 1 character in length:

CREATE TABLE supplier
( supplier_id numeric(10) not null,
  supplier_name varchar2(50) not null,
  contact_name varchar2(75)
);