Adding a colum

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

Adding a colum

От:
"Steven" <lacroix@newwaveindustries.com>
Дата:
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

От:
<davidb@vectormath.com>
Дата:
www.postgresql.org
select Info Central
select Documentation
select Integrated Document
select I - 19 ALTER TABLE
ALTER TABLE
ADD COLUMN

-----Original Message-----
From: Steven 
To: Postgres-Gen List

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

От:
Alfred Perlstein <bright@wintelcom.net>
Дата:
* Steven  [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

От:
jeam@themail.com
Дата:

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 


FAQ