How do you add fields to tables in PSQL?

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
MattSharp
Forum Commoner
Posts: 62
Joined: Wed Apr 24, 2002 2:25 pm

How do you add fields to tables in PSQL?

Post by MattSharp »

I was just wondering how can you can tables to an already existing field?
User avatar
captbrando
Forum Newbie
Posts: 4
Joined: Fri Apr 19, 2002 10:22 am
Location: Dallas, TX
Contact:

Add fields to existing table?

Post by captbrando »

I assume you mean add fields to an existing table. This is done with the ALTER TABLE command. The syntax is as follows...

ALTER TABLE yourtable ADD COLUMN columname datatype
MattSharp
Forum Commoner
Posts: 62
Joined: Wed Apr 24, 2002 2:25 pm

Post by MattSharp »

Thanks. Yea, I need to work on my proofreading....
Post Reply