<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>kayactech</author_name>
  <author_url>https://blog.hatena.ne.jp/kayactech/</author_url>
  <blog_title>KAYAC Engineers' Blog</blog_title>
  <blog_url>https://techblog.kayac.com/</blog_url>
  <categories>
    <anon>error</anon>
    <anon>mysql</anon>
  </categories>
  <description>こないだMySQLでちょっと珍しいエラー出ていたのでご紹介したいと思います。 Duplicate entry 'nnnnnnn' for key 1 発行したSQLは「id auto_increment」指定のされたテーブルに対してidを指定せず値を追加していたのですが、idを指定して追加しようとしても、idを指定せず追加しようとしても上記のエラーが出て追加できませんでした。 はじめは「INTの上限？」とも思ったのですが、7桁で発生するとも考えにくいので「select * from table where id = nnnnnnn;」と発行したところ、今度は以下のようなエラーが発生しました。 …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftechblog.kayac.com%2Fmysql-duplicate-entry-error.html&quot; title=&quot;MySQLのauto_incrementでDuplicate entryといわれたときに疑うこと - KAYAC Engineers&amp;#39; Blog&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2008-12-15 14:00:00</published>
  <title>MySQLのauto_incrementでDuplicate entryといわれたときに疑うこと</title>
  <type>rich</type>
  <url>https://techblog.kayac.com/mysql-duplicate-entry-error.html</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
