Re: [GENERAL] delete columm help

Поиск
Список
Период
Сортировка
От Tom Ivar Helbekkmo
Тема Re: [GENERAL] delete columm help
Дата
Msg-id 86k9772c6f.fsf@barsoom.Hamartun.Priv.NO
обсуждение исходный текст
Ответ на Off-topic: Communication. (was: Connect string again)  (Tom Ivar Helbekkmo <tih+mail@Hamartun.Priv.NO>)
Список pgsql-general
Joao Paulo Felix <felix@cyclades.com> writes:

> 1) Good books/reference on PostgreSQL for a novice?

I've no particular SQL book to recommend, although I hear much good
about Joe Celco's "SQL for Smarties".  For a very good online
tutorial, check out <http://w3.one.net/~jhoffman/sqltut.htm>.

> 2) How do I delete a columm from a table, I have tried to use the
> following:
>
> DELETE FROM table_name columm_name

That should be

    alter table table_name drop column column_name;

However, it's not yet implemented.  You might rename the table, create
a new one lacking the offending column, and copy the data over.  On
the other hand, you might just not worry about it.  That's one of the
great things about SQL: if you can take the space consumption hit, an
extraneous column doesn't matter.  Just don't "select *", which you
normally shouldn't do anyway.

-tih
--
Popularity is the hallmark of mediocrity.  --Niles Crane, "Frasier"

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

Предыдущее
От: Peter T Mount
Дата:
Сообщение: Re: [HACKERS] Off-topic: Communication. (was: Connect string again)
Следующее
От: Jaosn Tan
Дата:
Сообщение: JDBC drivers