Home » Developer & Programmer » Designer » Altering table design
Altering table design [message #234848] Thu, 03 May 2007 05:43 Go to next message
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 #234852 is a reply to message #234848] Thu, 03 May 2007 05:53 Go to previous messageGo to next message
Frank
Messages: 7901
Registered: March 2000
Senior Member
Yes, that would be a good way. There is an option to generate a script to update your existing tables to your 'designerversion'.
Re: Altering table design [message #234916 is a reply to message #234848] Thu, 03 May 2007 08:08 Go to previous messageGo to next message
spider99
Messages: 9
Registered: May 2007
Junior Member
Thanks for your reply.

Do you know whether this retains existing table data?

What is meant by 'designerversion'.
Re: Altering table design [message #234980 is a reply to message #234916] Thu, 03 May 2007 10:53 Go to previous message
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.
Previous Topic: ERWIN tool
Next Topic: Table Design issue
Goto Forum:
  


Current Time: Thu Mar 28 14:49:40 CDT 2024