| From: | Scott David Walter <sdw1(at)geneseo(dot)edu> |
|---|---|
| To: | <pgsql-sql(at)postgresql(dot)org> |
| Subject: | Alter Table problems |
| Date: | 2001-04-27 17:15:35 |
| Message-ID: | Pine.LNX.4.21.0104271301390.552-100000@venus.geneseo.edu |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-sql |
I am attempting to add a few attributes to an existing table that already
contains data. The problem that I am having is that the new attributes
that I want to add need to be forgein key references to other tables. I
can't figure out how to create the attribute with a reference to another
table. I tried the following, but all it did was create the
attribute... no forgein key:
ALTER TABLE student ADD COLUMN major REFERENCES degree_major;
I was also wondering how I would DELETE an attribute from an existing
table... i.e. ALTER TABLE student DELETE COLUMN major;
Any help would be much appreciated. Thanks.
-Scott
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Stephan Szabo | 2001-04-27 17:44:24 | Re: Alter Table problems |
| Previous Message | Stephan Szabo | 2001-04-27 16:50:26 | Re: Regular expressions and indexes |