<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>hit10231023</author_name>
  <author_url>https://blog.hatena.ne.jp/hit10231023/</author_url>
  <blog_title>Database JUNKY</blog_title>
  <blog_url>https://hit.hateblo.jp/</blog_url>
  <categories>
    <anon>MySQL</anon>
    <anon>オートインクリメント</anon>
    <anon>変更</anon>
    <anon>プライマリ</anon>
    <anon>プライマリーキー</anon>
    <anon>キー変更</anon>
    <anon>ドロッププライマリー</anon>
    <anon>increment</anon>
    <anon>primary key</anon>
    <anon>ERROR 1075 (42000): Incorrect table definition; there can be only one auto column and it must be defined as a key</anon>
    <anon>AUTO_INCREMENT</anon>
  </categories>
  <description>たとえば、こんなテーブルがあったとします。このテーブルってidがプライマリーキーです。 CREATE TABLE `users` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `seq_id` int(10) unsigned NOT NULL , `name` varchar(50) NOT NULL DEFAULT '', PRIMARY KEY (`id`) ) ; 以下のように、seq_idをPRIMARY KEYに変更したい場合、どのような手順を踏めば良いでしょうか？すこし力技になります CREATE TABLE `users` (…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fhit.hateblo.jp%2Fentry%2FMySQL%2FAUTO_INCREMENT&quot; title=&quot; MySQL AUTO_INCREMENTカラムの変更方法 - Database JUNKY&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>https://cdn-ak.f.st-hatena.com/images/fotolife/h/hit10231023/20180309/20180309104332.jpg</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2019-03-13 23:35:29</published>
  <title> MySQL AUTO_INCREMENTカラムの変更方法</title>
  <type>rich</type>
  <url>https://hit.hateblo.jp/entry/MySQL/AUTO_INCREMENT</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
