snipt

Ctrl+h for KB shortcuts

MySQL

Refresh row positions after deleting one

ALTER TABLE tablename AUTO_INCREMENT = 1
https://snipt.net/embed/b717021adcef5b85659677c4aff975e4/
/raw/b717021adcef5b85659677c4aff975e4/
b717021adcef5b85659677c4aff975e4
mysql
MySQL
1
2019-07-20T15:32:28
True
False
False
/api/public/snipt/3567/
refresh-row-positions-after-deleting-one
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="k">ALTER</span> <span class="k">TABLE</span> <span class="n">tablename</span> <span class="kp">AUTO_INCREMENT</span> <span class="o">=</span> <span class="mi">1</span> </span></pre></div> </td></tr></table>
mysql