Results 1 to 7 of 7
Feb 27, 2006, 09:50 #1
- Join Date
- Feb 2006
- 0 Post(s)
- 0 Thread(s)
Trouble creating foreign key references with MySQL/CocoaSQL
I have two tables, questions and questionnaires. In questions I want a field that references a questionnaire, but CocoaSQL (frontend for mysql) will not accept the syntax used in the Agile Web Dev book. I don't have the example here (don't have internet at home, now at uni), but it's something like
constraint fk_questions_questionnaires questions(questionnaire_id) references questionnaire(id)
Is this a problem of mine, of mysql or something else?
I thinking about using postgresql instead, but I need to use a (preferably) free hosting site to test it on.
So basically, my question is, how do I create a one-to-many relationship in my database?