Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

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

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

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!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report