I have created this table.
CREATE TABLE TourEvent(
TourID VARCHAR(7),
TourName references WineryTours(TourName),
Month CHAR (3),
Day NUMERIC (2),
Year NUMERIC (4),
Fee NUMERIC (4),
PRIMARY KEY(TourID)
);
I am trying to create another table that references pretty much all of this table into another one but i am running into trouble with
ORA-02270: no matching unique or primary key for this column-list
This is the code i have so far
CREATE TABLE Bookings(
BookingID VARCHAR(7) PRIMARY KEY,
ClientID references Clients(ClientID),
TourID references TourEvent(TourID),
Tour references TourEvent(TourName),
EventMonth references TourEvent(MONTH),
EventDay references TourEvent(DAY),
EventYear references TourEvent(Year),
Fee references TourEvent(Fee),
DateBooked Date
);
Reading about foreign keys it says i only can reference primary keys and i am trying different things but have no idea how to go on.
Thank you