Create table reference foreign key I'm trying to create a table referencing a primary key from the table person;

CREATE TABLE Membership (foreign key (USERNAME) references Person(USERNAME),MembershipNo INT Primary Key,DatePaid date NOT NULL,DateTo date,AnnualFee INT NOT NULL)
                                      *
ERROR at line 1: 
ORA-00904: "USERNAME": invalid identifier 


I'm ether blind as a bat(possible) and there is a syntax error or I'm missing something.

SELECT * FROM ALL_CONSTRAINTS WHERE TABLE_NAME='PERSON';

USERNAME     ROLE    DATEJOINED  ADDRESS     EMAILADDRESS    PHONENUMBER


`

SELECT * FROM ALL_CONSTRAINTS WHERE TABLE_NAME='PERSON';

STUBT001     SYS_C00145052   P   PERSON                  ENABLED     NOT DEFERRABLE  IMMEDIATE   VALIDATED   GENERATED NAME          17-OCT-2013         SYS_C00145052
You don't define a column USERNAME in your MemberShip table

CREATE TABLE Membership 
(
  MembershipNo INT Primary Key,
  DatePaid date NOT NULL,
  DateTo date,
  AnnualFee INT NOT NULL,
  username varchar(20) not null, -- &lt;&lt; you are missing this
  foreign key (USERNAME) references Person(USERNAME)
);


alternatively directly behind the column: 

CREATE TABLE Membership 
(
  MembershipNo INT Primary Key,
  DatePaid date NOT NULL,
  DateTo date,
  AnnualFee INT NOT NULL,
  username varchar(20) not null references Person(USERNAME)
);