How do I relate one column to another column in another table? Would I create a column with the same name in another table?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You need to establish a
FOREIGN KEYrelationship. I this example,Main_Table.idis referenced as a foreign key inRelated.main_table_idAdditionally, you can enforce the key relationship through deletion and update. If the row in
Main_Tableis deleted or has itsidchanged, you can force the change to cascade through the related table:See the documentation for full details.