I am constantly creating 2 scripts, one to create tables with PK index's, then another to add FK index's. If I don't do it in that order I'll get errors because a Foreign key hasn't yet been created.
Perhaps I'm missing an an obvious way to get around this as I haven't seen anyone else bring this up.
In fairness my table structure isn't small or simple. I've attached a screen shot of the diagram below in case its helpful.
Customer support service by UserEcho