alter primary key and all references in sql server I'm trying to alter a primary key field but is being referenced by about 93 tables.

I used the following script to drop and create the FK constraints: https://social.technet.microsoft.com/wiki/contents/articles/2958.script-to-create-all-foreign-keys.aspx

but I still need to alter all those referenced fields and they seem to reference others.

Anyone know an script that can handle all of that or knows a tool that can help me achieve this.

Thanks in advance
The SSMS table designer will generate this script for you.  Just make the change in the designer and generate the change script.  



There's a a safety config you have to set before the designer will generate scripts that drop and recreate tables.  That should be done on production servers only after testing.