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 · 2113 次点击
    这是一个创建于 2764 天前的主题,其中的信息可能已经有所发展或是发生改变。

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

    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   3665 人在线   最高记录 6547   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 04:43 · PVG 12:43 · LAX 21:43 · JFK 00:43
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.