Thread: Adding a colum

Adding a colum

From
"Steven"
Date:
I'm pretty new using postgres, but is there any way to add a field to a table without droping the table and recreating it?

Re: Adding a colum

From
Date:
www.postgresql.org
select Info Central
select Documentation
select Integrated Document
select I - 19 ALTER TABLE
ALTER TABLE
ADD COLUMN

-----Original Message-----
From: Steven <lacroix@newwaveindustries.com>
To: Postgres-Gen List
<pgsql-general@postgresql.org>
Date: Monday, July 17, 2000 1:28 PM
Subject: [GENERAL] Adding a colum


>I'm pretty new using postgres, but is there any
way to add a field to a
>table without droping the table and recreating
it?
>


Re: Adding a colum

From
Alfred Perlstein
Date:
* Steven <lacroix@newwaveindustries.com> [000717 11:28] wrote:
> I'm pretty new using postgres, but is there any way to add a field to a
> table without droping the table and recreating it?

it's in the docs:
http://www.postgresql.org/docs/user/sql-altertable.htm


--
-Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org]
"I have the heart of a child; I keep it in a jar on my desk."

Re: Adding a colum

From
jeam@themail.com
Date:
Just use the SQL command:

ALTER TABLE tablename ADD fieldname FIELD TYPE SPECS;

Examples:

ALTER TABLE STUDENTS ADD BIRTHDAY DATE;
ALTER TABLE CUSTOMERS ADD CREDITLIMIT FLOAT4;

Regards, Jorge.
__________________________________________________________________
Make A Buck Or Two @ TheMail.com - Free Internet Email
Sign-up today at http://www.themail.com/ref.htm?ref=908313