alter table table add column
alter table table add column
От:
Ronald Rojas <ronald.rojas@gmail.com>
Дата:
Hi,
Anybody knows how to add column with reference to BEFORE or AFTER any given column? Let say here's my table structure:
Column | Type | Modifiers
----------+-------------------+-----------
surname | character varying |
lastname | character varying |
address | character varying |
And, I want to add the field name age with type integer after lastname OR before the address field. How to I do that?
I would really appreciate your response.
Thanks in advance.
Anybody knows how to add column with reference to BEFORE or AFTER any given column? Let say here's my table structure:
Column | Type | Modifiers
----------+-------------------+-----------
surname | character varying |
lastname | character varying |
address | character varying |
And, I want to add the field name age with type integer after lastname OR before the address field. How to I do that?
I would really appreciate your response.
Thanks in advance.
================================================================================================== Ronald Rojas Systems Administrator Linux Registered User #427229 ================================================================================================== Arnold's Laws of Documentation:(1) If it should exist, it doesn't.(2) If it does exist, it's out of date.(3) Only documentation for useless programs transcends the first two laws. |
Re: [NOVICE] alter table table add column
От:
Michael Glaesemann <grzm@seespotcode.net>
Дата:
[Please don't post the same question to many lists. Choose one. If you're unsure if it's the correct list for your question, ask if there's a more appropriate one. This question is find for -novice or - general. Thanks.] On Jul 30, 2007, at 23:19 , Ronald Rojas wrote: > And, I want to add the field name age with type integer after > lastname OR before the address field. How to I do that? Can't without dumping the database, altering the schema in the dump, and reloading. But why does it matter? Just call the columns in the order you want. Michael Glaesemann grzm seespotcode net