Adsense Ad

Tuesday, 23 May 2017

Oracle: ORA-01430 Error Message

ORA-01430 Error Message

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

Description

When you encounter an ORA-01430 error, the following error message will appear:
  • ORA-01430: column being added already exists in table

Cause

You tried to add a column to a table, but the column name already exists in that table.

Resolution

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

Option #1

Rewrite your ALTER TABLE command to create a column with a unique name. Each column name must be unique within a table.
For example, if you had a table called suppliers defined as follows:
CREATE TABLE suppliers
( supplier_id number not null,
  supplier_name varchar2(50) not null,
  city varchar2(30),
  state varchar2(2),
  zip_code varchar2(10)
);
And you executed the following ALTER TABLE command:
ALTER TABLE suppliers
 ADD supplier_name varchar2(50);
You would receive the following error message:
Oracle PLSQL
The column called supplier_name already exists. Each column name in your table must be unique.

No comments: