1. <ul id="0c1fb"></ul>

      <noscript id="0c1fb"><video id="0c1fb"></video></noscript>
      <noscript id="0c1fb"><listing id="0c1fb"><thead id="0c1fb"></thead></listing></noscript>

      99热在线精品一区二区三区_国产伦精品一区二区三区女破破_亚洲一区二区三区无码_精品国产欧美日韩另类一区

      RELATEED CONSULTING
      相關(guān)咨詢
      選擇下列產(chǎn)品馬上在線溝通
      服務(wù)時(shí)間:8:30-17:00
      你可能遇到了下面的問題
      關(guān)閉右側(cè)工具欄

      新聞中心

      這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
      怎么重置mysql自增,mysql自增序列重置

      如何才能讓mysql自動遞增的字段重新從1開始

      alter table table_name auto_increment=n;

      讓客戶滿意是我們工作的目標(biāo),不斷超越客戶的期望值來自于我們對這個(gè)行業(yè)的熱愛。我們立志把好的技術(shù)通過有效、簡單的方式提供給客戶,將通過不懈努力成為客戶在信息化領(lǐng)域值得信任、有價(jià)值的長期合作伙伴,公司提供的服務(wù)項(xiàng)目有:域名注冊、網(wǎng)絡(luò)空間、營銷軟件、網(wǎng)站建設(shè)、永嘉網(wǎng)站維護(hù)、網(wǎng)站推廣。

      注意n只能大于已有的auto_increment的整數(shù)值,小于的值無效.

      show table status like 'table_name' 可以看到auto_increment這一列是表現(xiàn)有的值.

      如果曾經(jīng)的數(shù)據(jù)都不需要的話,可以直接清空所有數(shù)據(jù),并將自增字段恢復(fù)從1開始計(jì)數(shù)

      truncate table 表名

      怎么重置mysql的自增列AUTO

      重建列

      truancate 表

      使用命令,如下:

      Welcome to the MySQL monitor. Commands end with ; or \g.

      Your MySQL connection id is 2

      Server version: 5.5.41-log MySQL Community Server (GPL)

      Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.

      Oracle is a registered trademark of Oracle Corporation and/or its

      affiliates. Other names may be trademarks of their respective

      owners.

      Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

      mysql use test

      Database changed

      alter table t2 auto_increment=10;

      Query OK, 2 rows affected (0.17 sec)

      Records: 2 Duplicates: 0 Warnings: 0

      mysql insert into t2 values();

      Query OK, 1 row affected (0.05 sec)

      mysql select * from t2;

      +----+

      | id |

      +----+

      | 1 |

      | 2 |

      | 10 |

      +----+

      3 rows in set (0.00 sec)

      mysql

      修改mysql中自增序列的值,恢復(fù)初始值

      兩種方法修改或者重置mysql中的自增字段的值:autoIncrement;

      其中方法二可以修改成任意值。


      分享標(biāo)題:怎么重置mysql自增,mysql自增序列重置
      分享URL:http://www.ef60e0e.cn/article/heegge.html
      99热在线精品一区二区三区_国产伦精品一区二区三区女破破_亚洲一区二区三区无码_精品国产欧美日韩另类一区
      1. <ul id="0c1fb"></ul>

        <noscript id="0c1fb"><video id="0c1fb"></video></noscript>
        <noscript id="0c1fb"><listing id="0c1fb"><thead id="0c1fb"></thead></listing></noscript>

        西和县| 修文县| 蓝山县| 金寨县| 新乡市| 利辛县| 微博| 大足县| 盐池县| 光山县| 英山县| 呼图壁县| 延吉市| 康保县| 方城县| 台江县| 睢宁县| 许昌县| 英吉沙县| 那曲县| 仁怀市| 前郭尔| 陇南市| 青冈县| 黄平县| 昭通市| 连南| 吉安市| 府谷县| 米林县| 大安市| 文成县| 英吉沙县| 临海市| 汉阴县| 乌拉特前旗| 阳城县| 齐齐哈尔市| 常熟市| 改则县| 华池县|