0

I have a number of incidents where SSMS tells me table recreation is required, even for something simple like making a column nullable. If this table is referenced by FK's, I would ideally like to find a way of temporarily removing those FK's from the 'other' tables, re-creating my table, and then re-creating the FK's on the other table again.

Is there a known way of doing this?

ProfK
  • 493
  • 5
  • 9
  • 28

1 Answers1

0

Disabling won't work in this case.

I'd probably do this:

  1. use the SSMS GUI to make my changes
    • save the script: do not execute it
    • run this section by section
    • use a compare tool to generate a better script (eg Red Gate)

Step 4 is optional and you pimp the script from step 2/3 instead

gbn
  • 6,079
  • 1
  • 18
  • 21