Re: alter table add column question
- From: "Paul Pedersen" <no-reply@xxxxxxxx>
- Date: Mon, 26 Sep 2005 19:05:58 -0700
I think it isn't possible to do what you want, without recreating the table
as you mentioned.
I think that ability was not included because in the theoretical SQL scheme
of things, physical position of the column is supposed to be irrelevant. In
fact, it's probably supposed to be unknowable to the consumer of the data.
Theoretically. Of course, practicality occasionally gets in the way of
theory.
"Keith G Hicks" <krh@xxxxxxxxxxx> wrote in message
news:O1kQHpvwFHA.2348@xxxxxxxxxxxxxxxxxxxxxxx
> Is there a way to specify what position a column is in the table when
> altering tables in code? I have a client that has me do major updates
> annually which involve removing obsolete columns and adding new columns. I
> set up code in batches and thoroughly test things before altering their
> production data. So I might have a prg file that does soemthign like this
> (dumb example but you'll get the idea):
>
> alter table Customer drop column KidsNames
> alter table Customer add column DogsNames c(50)
>
> Let's say there are 12 columns in the table and I'd like DogsNames to
> occupy
> the 6th position. I know of course that I can do "modi stru" and move it
> manullly but that defeats the purpose of writing my code. How can I
> position
> columns so that they are not just tacked onto the end of the table?
>
> Thanks,
>
> Keith
>
>
.
- References:
- alter table add column question
- From: Keith G Hicks
- alter table add column question
- Prev by Date: Re: _screen.caption
- Next by Date: refresh a view without view designer
- Previous by thread: Re: alter table add column question
- Next by thread: refresh a view without view designer
- Index(es):
Relevant Pages
|