• I got it wrong as well, even though I "cheated" and tried it out before answering 🙂 I didn't have rows in myanothertable and then of course the not null constraint didn't trigger.

    Thanks for enlightning me.