Re: Insert new column instead of append
From: Russell Fields (RussellFields_at_NoMailPlease.Com)
Date: 09/07/04
- Next message: Russell Fields: "Re: materialized view vs. denormalized table"
- Previous message: Fie Fie Niles: "Could not start the MSSQLServer Service on local computer. Error: 1068: the dependency service or group failed to start"
- In reply to: GregS: "Insert new column instead of append"
- Next in thread: Wayne Snyder: "Re: Insert new column instead of append"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 7 Sep 2004 15:50:15 -0400
Greg,
No, sorry.
The way that you can do it is:
1. Create a new table defined as you want it to be.
2. Move all the data to the new table
3. Drop the old table.
4. Rename the new table to the old table name.
Reestablish all constraints, triggers, etc, that are needed to get your
system back to the way that you want it to be. Obviously, this should not
be done while the database is in use.
Russell Fields
"GregS" <anonymous@discussions.microsoft.com> wrote in message
news:792e01c49512$dc19e110$a501280a@phx.gbl...
> Is anyone aware of Transact-SQL commands/system procedures
> that permit a column to be inserted into a table
> structure, a la Enterprise Manager, as opposed to simply
> appending, as ALTER TABLE does? We're looking to automate
> updates over a range of servers/databases, so Enterprise
> Manager is out. Alternately, how about a method for
> reordering columns? I understand this is a cosmetic
> issue, and I don't want to update system tables. Thanks.
- Next message: Russell Fields: "Re: materialized view vs. denormalized table"
- Previous message: Fie Fie Niles: "Could not start the MSSQLServer Service on local computer. Error: 1068: the dependency service or group failed to start"
- In reply to: GregS: "Insert new column instead of append"
- Next in thread: Wayne Snyder: "Re: Insert new column instead of append"
- Messages sorted by: [ date ] [ thread ]