In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces the navicat setting foreign key error 1025 solution, the article is very detailed, has a certain reference value, interested friends must read it!
What if navicat sets a foreign key to report an error 1025? Here are some examples:
Example:
Change the id key of member table to bigint:alter table member modify column id BIGINT
The following error was found during execution:
ERROR 1025 (HY000): Error on rename of'.\ test\ # sql-c68_10' to'.\ test\ member' (errno: 150)
Reason:
The id primary key field of the member table is the foreign key of another address. Changing the id field type of the primary table will cause the primary table to be inconsistent with the foreign key associated table field.
Solution:
(1) find the foreign key association table and find the foreign key name.
(2) delete foreign key constraints.
(3) modify the id field type of member: alter table member modify column id bigint
(4) modify the member_id field type of address: alter table address modify column member_id bigint
(5) add the deleted foreign key: alter table address add constraint fk_member_address foreign key (member_id) references member (id)
The above is all the contents of this article entitled "the solution of navicat setting Foreign key error 1025". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.