Skip to content

Instantly share code, notes, and snippets.

@zelark
Last active August 29, 2015 14:14
Show Gist options
  • Save zelark/179dd94f58de9e40ac17 to your computer and use it in GitHub Desktop.
Save zelark/179dd94f58de9e40ac17 to your computer and use it in GitHub Desktop.
ORA-00957: duplicate column name
SQL> create table test_ins (x number(1));
Table created.
SQL> insert into test_ins (x, x) values (1, 2);
insert into test_ins (x, x) values (1, 2)
*
ERROR at line 1:
ORA-00957: duplicate column name
SQL> insert into test_ins (test_ins.x, x) values (1, 2);
1 row created.
SQL> select * from test_ins;
X
----------
2
SQL>
lark=# create table test_ins (x integer);
CREATE TABLE
lark=# insert into test_ins (x, x) values (1, 2);
ERROR: column "x" specified more than once
LINE 1: insert into test_ins (x, x) values (1, 2);
^
lark=# insert into test_ins (test_ins.x, x) values (1, 2);
ERROR: column "test_ins" of relation "test_ins" does not exist
LINE 1: insert into test_ins (test_ins.x, x) values (1, 2);
^
lark=#
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment