Can anyone point me in the right direction here please?
My database is 99% complete, I've managed to build all tables using SQL however when trying to build the table below, I'm seeing this error message: Invalid field definition 'Child_ID' in definition of index or relationship.
Here's the SQL for the table I want to create:
CREATE TABLE Meal( Meal_ID int NOT NULL, MealType TEXT(20), MealDate TEXT(20), FOREIGN KEY (Child_ID) REFERENCES Child(Child_ID));
Here's the code from the 'Child' table where the Child ID PK is located. There are other tables with the Child ID FK but I've tried those. I did read somewhere that it may be a location issue but I can't for the life of me spot the error.
CREATE TABLE Child( Child_ID int NOT NULL, FirstName TEXT(20), SecondName TEXT(20), DateOfBirth TEXT(20), PRIMARY KEY (Child_ID));
Thanks once again!