Re: How do I alter an existing column and add a foreign key which isa Primary key to a table? - Mailing list pgsql-admin

From David G. Johnston
Subject Re: How do I alter an existing column and add a foreign key which isa Primary key to a table?
Date
Msg-id CAKFQuwYwO4EdGQ_H6avBUQaeUTOyoLFw17OicCXsFzVVri4aUw@mail.gmail.com
Whole thread Raw
In response to Re: How do I alter an existing column and add a foreign key whichis a Primary key to a table?  (Karen Goh <karenworld@yahoo.com>)
Responses Re: How do I alter an existing column and add a foreign key whichis a Primary key to a table?
List pgsql-admin
On Sunday, July 21, 2019, Karen Goh <karenworld@yahoo.com> wrote:
You can't Select s_tutor.zip_code from subject_tutor as zip_code belongs to s_tutor table.

Hence, I wrote my last message about my confusion.


You need to show your entire schema and the queries that are giving you trouble if you want to get help that is less confusing.  Though as I wrote before I think your immediate problem is that you don’t have a “tutor” table on which to create the PK.

David J.

pgsql-admin by date:

Previous
From: Tom Lane
Date:
Subject: Re: Database.Schema.Table
Next
From: Karen Goh
Date:
Subject: Fw: How do I alter an existing column and add a foreign key whichis a Primary key to a table?