I have 2 tables:
university:
university
university_id(p.k) | university_name
and user:
user
uid | name |
I was using MySQL InnoDB and even allowing NULL in the FK column and using NULL as default I was getting an error. So I used the SET syntax:
INSERT INTO (table) SET value1=X...
And I just don't set the FK column.