Workbench GUI is not allowing me to select checkboxes.Īs you can see from this image I can't select checkbox or select combobox value.ĮDIT: I can manage this with query, but there are a lot of tables in some projects, dont want to do it all with queries. The foreign key constraints are basically used to. I'm trying to create a foreign key between location.id and item.locationId. Note: A foreign key in one TABLE points to either a primary key or a unique key in another table in MySQL. Enter a name for the foreign key and select the column or columns that you wish to index. Here's my Show Create Table 'tableName' CREATE TABLE `item` (Īnd the other one CREATE TABLE `location` ( To add a foreign key, click the last row in the Foreign Key Name list. The issue is I want to check on another field that is not the key, but yet has so stay unique. Create your relations (add foreign keys) Select the appropriate relationship type from the toolbar In the diagram, click on the header of the table you want. After that I've tried to create some foreign keys for int(11) columns but GUI is not allowing me to do so. INSERT INTO table (a) VALUES (0) ON DUPLICATE KEY UPDATE but it only works if you check doubles on the key. O MySQL, a partir da versão 3.23.43b, passa a incorporar o recurso de criação e manutenção de tabelas do tipo InnoDB. Um artigo completo que vai te ajudar a compreender tudo sobre chave estrangeira no MySQL. I've created them by using only gui not a single query. Veja nesse artigo como implementar uma chave estrangeira no MySQL a partir do uso de tabelas do tipo InnoDB. I'm creating my tables by using Mysql Workbench 6.3. There are two core routines needed by this implementation: the first is to find candidate columns. You have to define a name, the referenced table, the column that will. Looking on the 'DDL' tab it clearly shows FK constraints against the table, but as per original poster there is simply a blank 'Foreign Keys' tab. First of all I've examined a lot of questions and googled it a lot, none of them solved my problem. Switch to Foreign Keys tab and create the FOREIGN KEY constraint as shown in Figure 14. We experienced this problem when using Workbench 8.0.19 and were hoping the upgrade to workbench 8.0.22 would address the issue but are sad that it has not.
0 Comments
Leave a Reply. |