Thread: 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?
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? >
* 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."
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