StackPuz Forum

How to create Index Key (foreign key)

Generated Code MySQL

i want to make relation between 2 tables. table 1 "ERDC-data", table 2 "negara"

CREATE TABLE Data (
id_data INT AUTO_INCREMENT PRIMARY KEY,
negara INT,
hasil_survei TEXT,
FOREIGN KEY (negara) REFERENCES Negara(id_negara)
);

i can not find the button to do this. thank you.
https://box.barantinkalteng.org/wp-content/uploads/2024/10/StackPuz01.pdf

On Thu, 10 Oct 2024 09:22:40 by marsanto.id
Comment 1

Hi, the attached file shows the "Table Designer" page. To create relationships (foreign keys), please click on "Relations" in the project and follow these steps.
https://doc.stackpuz.com/create-relation
This video also demonstrates how to create relationships between tables.
https://youtu.be/yubt5CEHQ6I

Please note, the relationships you create will only be used by our code generator. We do not support generating these relationships to the SQL script.

On Thu, 10 Oct 2024 10:23:32 by Admin ✓ Accepted
Comment 2

thankyou.

On Thu, 10 Oct 2024 14:19:13 by marsanto.id

*To create the code section, use <code>your code</code> and to create the link, use <a>your link url</a>