V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
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 · 2016-10-17 18:57:16 +08:00 · 2107 次点击
    这是一个创建于 2754 天前的主题,其中的信息可能已经有所发展或是发生改变。

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

    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2263 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 15:21 · PVG 23:21 · LAX 08:21 · JFK 11:21
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.