Обсуждение: column order

Поиск
Список
Период
Сортировка

column order

От
Robert Kernell
Дата:
Hello.

I know how to add a new column to a table. But it always puts it as the last
column. How can I add a new column and make it, say, the second column? Is this
possible?

Bob Kernell
Research Scientist
Surface Validation Group
AS&M, Inc.
email: kernell@sundog.larc.nasa.gov
tel: 757-827-4631


Re: column order

От
Дата:
On Fri, 6 Oct 2000, Robert Kernell wrote:

> I know how to add a new column to a table. But it always puts it as
> the last column. How can I add a new column and make it, say, the
> second column? Is this possible?

I don't believe so.  But in general, it doesn't make any difference what
order the fields are in internally.  You can specify the order they get
displayed or inserted into in your SQL.  If your fields are in this order:

f3 f1 f2

You can still do :

INSERT INTO table(f1,f2,f3) VALUES ('value1','value2','value3');

or

SELECT f1,f2,f3 FROM table;

You could always create a view to rearrange the fields into the order you
desire also.

Brett W. McCoy
                                              http://www.chapelperilous.net
---------------------------------------------------------------------------
Calm down, it's *____only* ones and zeroes.