V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
MySQL 5.5 Community Server
MySQL 5.6 Community Server
Percona Configuration Wizard
XtraBackup 搭建主从复制
Great Sites on MySQL
Percona
MySQL Performance Blog
Severalnines
推荐管理工具
Sequel Pro
phpMyAdmin
推荐书目
MySQL Cookbook
MySQL 相关项目
MariaDB
Drizzle
参考文档
http://mysql-python.sourceforge.net/MySQLdb.html
s884812
V2EX  ›  MySQL

MySQL auto_inc 重置和 foreign key 问题

  •  
  •   s884812 · Oct 17, 2016 · 2963 views
    This topic created in 3491 days ago, the information mentioned may be changed or developed.

    假设我的,MySQL 数据库内有两个表,分别是 A 跟 B A 的结构如下: id,name,phone B 的结构如下: id,Aid,name B 的 Aid 是跟 A 的 id 相关连, foreign key. 我今天想重置 A 的 id ,因为他已快到达 int 的限制,我该如何重置并且一并修改同步 B 的 Aid ?

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2961 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 07:26 · PVG 15:26 · LAX 00:26 · JFK 03:26
    ♥ Do have faith in what you're doing.