Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Changing column size of several tables
Message
 
General information
Forum:
Microsoft SQL Server
Category:
Other
Environment versions
SQL Server:
SQL Server 2014
Application:
Web
Miscellaneous
Thread ID:
01604976
Message ID:
01604982
Views:
28
>>>>Hi,
>>>>
>>>>I need to change (increase) the size of the column in the parent table as well as a couple of child tables. E.g. part_no currently is char(20) which I need to make char(25). When I make this change to the parent table column in SSMS, I get the message prompting/asking that all child table columns will be modified too. When I say Yes, they are modified. And this is what I want.
>>>>
>>>>But before I start making this change to the customer(s) database I have a question. Should I use a different method of increasing the size of this column? That is, is there a catch or a downside of changing the column from SSMS?
>>>>
>>>>TIA.
>>>
>>>I think it should be fine. Save the script first, make a backup of the database and then you can use this method. You can also check using INFORMATION_SCHEMA.Columns if there are tables which are missed by that script.
>>
>>First, thank you. How do you use the INFORMATION_SCHEMA.columns to find the tables where this column exist? (if this is what you mean).
>
>select * from INFORMATION_SCHEMA.Columns where Column_Name = 'ColumnNameToChange'

Thank you. I will double check.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Reply
Map
View

Click here to load this message in the networking platform