This discussion is archived
2 Replies Latest reply: Nov 6, 2012 9:11 AM by Bao Tian RSS

Problems with father and child table

Bao Tian Newbie
Currently Being Moderated
Hello I have a problem to create a sub table via sql command.
People is my father table and Employee is my sub table (Employee is a part of People).

But I can't create the Employee table, there is always the the error "ORA-00955 name is already used by an existing object".
What did I wrong? How I can use the attribute of People.
I also changed in table People primary key into UNIQUE but still the same error.

-----------------------------------------------------------------------------
create table People (
P_ID integer not null,
Surname varchar(30),
constraint pk_People primary key (P_ID));



create table Employee(
P_ID integer not null,
Salary number,
constraint fk_Employee foreign key (P_ID) references People (P_ID),
constraint pk_Employee primary key (P_ID));

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points