Altering table design [message #234848] |
Thu, 03 May 2007 05:43 |
spider99
Messages: 9 Registered: May 2007
|
Junior Member |
|
|
What is the best way to add new columns to an existing table? I was thinking of using the Design Editor > Server Model to add the new columns, and then using the Generate function to alter the table in the database.
If I use the Generate function in the Design Editor Server Model to add new columns to an existing table, will the data in the table be lost?
Is it possible to script this up for when we introduce the changes to production?
|
|
|
|
|
Re: Altering table design [message #234980 is a reply to message #234916] |
Thu, 03 May 2007 10:53 |
Frank
Messages: 7901 Registered: March 2000
|
Senior Member |
|
|
It generates alter table scripts to add columns to your database tables, to make it match the version you have in Designer.
Since it only adds columns (or alters them if you've altered them, or drops them etc) it keeps your existing data.
Best to read the script before executing it on Live/Production database of your nation's defence system.
|
|
|