Skip site navigation (1) Skip section navigation (2)

Re: Is there a way to drop a column?

From: Karel Zak <zakkr(at)zf(dot)jcu(dot)cz>
To: "G(dot) Anthony Reina" <reina(at)nsi(dot)edu>
Cc: "pgsql-general(at)hub(dot)org" <pgsql-general(at)hub(dot)org>
Subject: Re: Is there a way to drop a column?
Date: 2000-05-30 18:27:46
Message-ID: Pine.LNX.3.96.1000530202423.31890A-100000@ara.zf.jcu.cz (view raw, whole thread or download thread mbox)
Thread:
Lists: pgsql-general
On Tue, 30 May 2000, G. Anthony Reina wrote:

> Somehow some columns from one of my tables "melded" with another table.
> I'm trying to figure out how this happened, but in the meantime, I'd
> like to be able to delete the extra columns in the table.
> 
> I can see a way to "alter table ... add column". Is there a way to
> "alter table ... drop column"?

 SELECT without_a_column INTO xxx FROM tab;
 DROP TABLE tab;
 ALTER TABLE xxx RENAME TO tab;

 OK?

					Karel


In response to

Responses

pgsql-general by date

Next:From: G. Anthony ReinaDate: 2000-05-30 18:43:58
Subject: Is there a way to drop a column?
Previous:From: Philip HallstromDate: 2000-05-30 18:20:10
Subject: Any way to send email from "within" PostgreSQL?

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group