Hi.
I am from a Microsoft background. Is there any way to create a FOREIGN key in the HeidiSQL gui??
Thank you
Sarel
Create foreign keys
Not via GUI, you'll have to write the ALTER TABLE queries yourself. See the docs.
This GUI looks promising, but I am using FKs in almost every table... so without this feature it is hardly useful for me.
The ticket with FK GUI request (Issue #400) is older than a year... and that doesn't look promising :(
The ticket with FK GUI request (Issue #400) is older than a year... and that doesn't look promising :(
Foreign keys were implemented recently, btw. See it in action in a developer build.
Hi folks,
I eventually managed to create a FOREIGN KEY in a Heidi SQL table.
Here is how I did it ;
1. Create your Primary keys. For me this was straight forward so I won't post how to do that here
2. To create your FOREIGN KEYS you need to change the table / engine type for each table from MyIASM to InnoDb. To do this Select the table on the right hand side then select the OPTIONS tab on the right hand side and change the engine from MyIASM to InnoDb for every table.
Thats it ... Now I hope you will find it eariear to create tables with foreign keys.
I am not a dB expert and am interested to know why MyIASM does not support FK though InnoDb does. IS FK really necessary in a dB, or is it just that FK is only supported in InnoDb in HeidiSQL ?
I eventually managed to create a FOREIGN KEY in a Heidi SQL table.
Here is how I did it ;
1. Create your Primary keys. For me this was straight forward so I won't post how to do that here
2. To create your FOREIGN KEYS you need to change the table / engine type for each table from MyIASM to InnoDb. To do this Select the table on the right hand side then select the OPTIONS tab on the right hand side and change the engine from MyIASM to InnoDb for every table.
Thats it ... Now I hope you will find it eariear to create tables with foreign keys.
I am not a dB expert and am interested to know why MyIASM does not support FK though InnoDb does. IS FK really necessary in a dB, or is it just that FK is only supported in InnoDb in HeidiSQL ?
Please login to leave a reply, or register at first.