Avatar of brgdotnet
brgdotnet
Flag for United States of America asked on

Adding columns to an old table could cause a crash in a stored procedure or view?

I have a database with over 150 tables and around 300 stored procedures. There is a table which has been used for a very long time now. Let call it "Customers". I need to add two new columns to this table, The columns can be null, however I am worried that the column addition might break a stored procedure or view. I have around 300 stored procedures that reference the "Customers" table. I don' know which of these stored procedures insert to the Customers table. 

I am thinking that only stored procedures that insert to the Customers table have the potential of crashing, however I am not sure. Maybe they would not crash since the two new columns can have null values. Has anyone ever had to deal with a similar issue?

Databases

Avatar of undefined
Last Comment
Carlos Trujillo Almeida

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
slightwv (䄆 Netminder)

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
SOLUTION
Carlos Trujillo Almeida

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
slightwv (䄆 Netminder)

>>insert into tbl select * from tbl_2), the default values of the fields should work and there would be no problem either.

There could be if tbl_2 is the one that received the new column and tbl didn't get a new column.
Carlos Trujillo Almeida

There could be if tbl_2 is the one that received the new column and tbl didn't get a new column.
 in this case if there is an error.
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23