We help IT Professionals succeed at work.
Get Started

SQL Server: How to change a field length? (From very experienced user)

midfde
midfde asked
on
743 Views
Last Modified: 2012-08-12
[AHU Key] column is present in 38 tables.Its size is 15
There are 56 FK relationships among the above tables.
Purpose: To change key's size to, say 50.
Why is this question here? Please see the attached image.

Finally the question itself:
Can anybody suggest a safe method of changing lengths of [AHU Key] in all 38 tables?

If anybody doesn't acknowledge what it is about, then please do not bother. Also please do not reply with trivialities like "delete all foreign keys and then restore them" (because "safe" above is a key word).
P.S. Live situation is about 4 times more complex (plus [CHi Key], [Hyd Key], [Met Key]).
Experts Exchange has already helped me to do it in my multiple MS Access databases.
-.jpg
Comment
Watch Question
Senior Developer
Commented:
This problem has been solved!
Unlock 2 Answers and 6 Comments.
See Answers
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE