Re: [INTERFACES] How do I drop a column from a table?

Поиск
Список
Период
Сортировка
От Thomas Lockhart
Тема Re: [INTERFACES] How do I drop a column from a table?
Дата
Msg-id 37CB7DE9.D22E7E45@alumni.caltech.edu
обсуждение исходный текст
Ответ на How do I drop a column from a table?  (Robert Carbonari <robertC@opmr.com>)
Ответы Re: [INTERFACES] How do I drop a column from a table?
Список pgsql-interfaces
> I'm still quite new at this but it should be a simple operation:  How do I
> drop a column form a Postgres table.  The next best thing would be knowing
> how to change a column so that it can accept null values.

Adding columns is directly supported. Removing columns, or redefining
them, is done with a CREATE TABLE AS/DROP TABLE/CREATE TABLE AS/DROP
TABLE sequence, where you write the columns you want to retain into a
temporary table, delete the original table, and then do the same back
into a new table with the same name as the original.

Good luck.
                        - Thomas

-- 
Thomas Lockhart                lockhart@alumni.caltech.edu
South Pasadena, California


В списке pgsql-interfaces по дате отправления:

Предыдущее
От: Adolfo Diaz
Дата:
Сообщение: [INTERFACE] Need an example
Следующее
От: José Carlos Faial
Дата:
Сообщение: ODBC Questions