Whoever named SQL 'Structured Query Language' must have been joking. It is without a doubt the most unstructured joke of a language I've ever come across!
The solution to the problem above is this:
1. Make your tables, with primary keys.
2. do an
ALTER TABLE myTable ADD FOREIGN KEY FKey1 REFERENCES myOtherTable
before you INSERT into the tables.
In other words, make the table then change it to do something you should be able to do first time round but can't.
Another way is to insert ALL of the attributes into a HUGE parent table and foreign key everything from that!
Normalisation? Database efficiency? Hey who needs it when you have UQL - Unstructured Query Language!