Re: Alter Database Move column
From: Wayne Snyder (wsnyder_at_computeredservices.com)
Date: 05/22/04
- Next message: Wayne Snyder: "Re: Table modifications - additional information"
- Previous message: David Portas: "Re: SQL Server on ISPs Network"
- In reply to: Bob Clegg: "Alter Database Move column"
- Messages sorted by: [ date ] [ thread ]
Date: Sat, 22 May 2004 07:27:34 -0400
Although you didn't ask, Bob, it is often considered to be a flaw when we
depend on the physical ordering of the columns in a table... When I first
started doing this stuff many years ago, I tried to keep columns in tables
in a particular order, and found myself dropping/recreating tables all of
the time ( all on nights and weekends as well).
I encouraged the programmers to always use a column list and life got
better...
I'm not trying to tell you how to do your job, just making an observation
you might find helpful...
-- Wayne Snyder, MCDBA, SQL Server MVP Mariner, Charlotte, NC www.mariner-usa.com (Please respond only to the newsgroups.) I support the Professional Association of SQL Server (PASS) and it's community of SQL Server professionals. www.sqlpass.org "Bob Clegg" <bclegg@clear.net.nz> wrote in message news:%23cIRcW9PEHA.3304@TK2MSFTNGP12.phx.gbl... > Hi, > Is it possible to move a column using an SQL script? > I have looked at the Alter Table syntax help but can't see any indication of > ordinal control . > I have a table that I have had to add an indentity column to. > I want to move it to pos 0. > My script so far is : > alter table MasterStationTest > drop constraint pk_masterstationtest > > go > > alter table MasterStationTest > add id int > IDENTITY(1,1) > PRIMARY KEY > go > thanks > Bob > >
- Next message: Wayne Snyder: "Re: Table modifications - additional information"
- Previous message: David Portas: "Re: SQL Server on ISPs Network"
- In reply to: Bob Clegg: "Alter Database Move column"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|