Get the App
SLTechnology News&Howtos  ›  Database  › 

What if navicat makes a mistake in creating the Foreign key Times 1215?

Shulou Source: shulou.com Published: 2022-06-01 00:16:15 10月03日 Update

This article is about how navicat made a mistake in creating the Foreign key Times 1215. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

When creating a foreign key, navicat sometimes reports an error of 1215 Cannot add foreign key constraint, that is, it cannot add a foreign key constraint. Analyze the causes of the error and the solutions:

There are three main reasons for this problem:

(1) the field data types corresponding to foreign keys are inconsistent.

(2) when setting foreign keys, "when deleting" is set to "SET NULL"

(3) the storage engines of the two tables are not consistent.

Attached: the method of viewing the storage engine of the table

Show table status from database name where name=' table name'

Modify table storage attentive method

Alter table table_name engine=innodb

Extended data

Navicat is a fast, reliable and affordable database management tool designed to simplify database management and reduce system management costs. It is designed to meet the needs of database administrators, developers and small and medium-sized enterprises. Navicat is built with an intuitive graphical user interface that allows you to create, organize, access, and share information in a secure and simple way.

Navicat is well-known in the world, widely trusted by major enterprises, government institutions and educational institutions around the world, and is a necessary working partner for practitioners from all walks of life. Since 2001, Navicat has been downloaded more than 2000000 times worldwide and has a customer base of more than 70000 users. More than 100 Fortune 500 companies are also using Navicat.

Navicat provides customers with up to 7 languages to choose from and is recognized as the most popular database front-end user interface tool in the world.

It can be used to manage and develop local or remote MySQL, SQL Server, SQLite, Oracle and PostgreSQL databases.

The functionality of Navicat is sufficient to meet all the needs of professional developers, and it is quite easy for novice database servers to learn. With a very complete graphical user interface (GUI), Navicat allows you to create, organize, access and share information in a secure and easy way.

Navicat is available on three platforms-Microsoft Windows, Mac OS X and Linux. It allows users to connect to any local or remote server and provides some practical database tools such as data model, data transfer, data synchronization, structural synchronization, import, export, backup, restore, report creation tools and scheduling to assist in managing data.

Thank you for reading! This is the end of the article on "what to do when navicat made a mistake in creating the Foreign key Times 1215". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it out for more people to see!

Tags: Data database management users tools global method user interface interface storage development what to do Times error utility consistency security world people enterprise Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno macOS Redmi Apple Shulou Information MariaDB